Spark Job Server继续获得无效的Jar

时间:2015-11-06 02:20:51

标签: spark-jobserver

我使用sbt job-server-api / packages和sbt job-server-tests / packages进行构建。 我可以使用jar -cxf命令

扩展/解压缩jar
curl --data-binary /opt/hadoop/spark-jobserver/job-server-api/target/scala-2.10/job-server-api_2.10-0.6.1-SNAPSHOT.jar localhost:8090/jars/test
{
  "status": "ERROR",
  "result": "Jar is not of the right format"
}


 curl --data-binary /opt/hadoop/spark-jobserver/job-server-tests/target/scala-2.10/job-server-tests_2.10-0.6.1-SNAPSHOT.jar localhost:8090/jars/test
{
  "status": "ERROR",
  "result": "Jar is not of the right format"
}

sbt version
[info] Loading project definition from /opt/hadoop/spark-jobserver/project
Missing bintray credentials /root/.bintray/.credentials. Some bintray features depend on this.
Missing bintray credentials /root/.bintray/.credentials. Some bintray features depend on this.
Missing bintray credentials /root/.bintray/.credentials. Some bintray features depend on this.
Missing bintray credentials /root/.bintray/.credentials. Some bintray features depend on this.
[info] Set current project to root (in build file:/opt/hadoop/spark-jobserver/)
[info] job-server-tests/*:version
[info]  0.6.1-SNAPSHOT
[info] job-server-extras/*:version
[info]  0.6.1-SNAPSHOT
[info] job-server-api/*:version
[info]  0.6.1-SNAPSHOT
[info] akka-app/*:version
[info]  0.6.1-SNAPSHOT
[info] job-server/*:version
[info]  0.6.1-SNAPSHOT
[info] root/*:version
[info]  0.6.1-SNAPSHOT

我使用的是SPARK版本1.5。

我能够查看清单。  猫MANIFEST.MF

Manifest-Version: 1.0
Implementation-Vendor: spark.jobserver
Implementation-Title: job-server-tests
Implementation-Version: 0.6.1-SNAPSHOT
Implementation-Vendor-Id: spark.jobserver
Specification-Vendor: spark.jobserver
Specification-Title: job-server-tests
Implementation-URL: https://github.com/spark-jobserver/spark-jobserver
Specification-Version: 0.6.1-SNAPSHOT

您能帮我解决jar格式问题吗?

1 个答案:

答案 0 :(得分:14)

在jar文件路径之前放一个@,如下所示:

curl --data-binary @/opt/hadoop/spark-jobserver/job-server-api/target/scala-2.10/job-server-api_2.10-0.6.1-SNAPSHOT.jar localhost:8090/jars/test