简体   繁体   English

Spark Maven Jar文件依赖

[英]spark maven jar file dependency

I have used Eclipse with Maven, Java and Scala to develop a simple Spark application. 我已经将Eclipse与Maven,Java和Scala结合使用来开发一个简单的Spark应用程序。 Under the target folder, Maven install command has created two JAR files one named as application.jar and the other one named as application-with-dependencies.jar . 在目标文件夹下,Maven install命令创建了两个JAR文件,一个名为application.jar ,另一个名为application-with-dependencies.jar My question is which JAR file I should use to submit it to the Spark cluster? 我的问题是应该使用哪个JAR文件将其提交到Spark集群? Also, why there are two JAR files? 另外,为什么有两个JAR文件? The file called application.jar is fraction of the size application-with-dependencies.jar 名为application.jar的文件仅占application-with-dependencies.jar大小的一部分

Maven usually generates a JAR file containing only your compiled classes and resources, but using some plugins, like maven-assembly-plugin , maven can also generate an uber-jar, ie: a JAR file that contains not only your classes and resources, but also libraries your project depends on. Maven通常会生成仅包含已编译的类和资源的JAR文件,但是使用某些插件(例如maven-assembly-plugin) ,maven也可以生成uber-jar,即:一个JAR文件,它不仅包含您的类和资源,而且包含还库您的项目依赖。

Without more information application-with-dependencies-jar looks like one of those uber-jar. 没有更多信息application-with-dependencies-jar看起来就像是那些超级jar之一。

From spark documentation looks like that's the JAR you must submit to the Spark cluster. 从Spark 文档看来,这就是您必须提交到Spark集群的JAR。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM