简体   繁体   English

使用依赖项构建Apache Spark Mllib

[英]Building Apache spark Mllib with dependencies

I don't want to run spark in a cluster. 我不想在集群中运行spark。 The only reason for using spark is to make use of the MLlib. 使用spark的唯一原因是要使用MLlib。 In a nutshell, I need to use MLlib jar in my application with bare minimal dependencies. 简而言之,我需要在我的应用程序中使用MLlib jar,并且几乎没有任何依赖。 Currently, my spark assembly jar is around 125 MB. 目前,我的火花装配罐大约为125 MB。 Is there any way to minimize it? 有什么办法可以将其最小化?

Depending on how an application gonna be used you can mark dependencies as provided, that will reduce the size of your jar, so deployments will be faster. 根据应用程序的使用方式,您可以将提供的依赖项标记为已提供的依赖项,这将减少jar的大小,因此部署会更快。

Also, you check if maven assembly also included Scala stdlib in jar ( sbt assembly by default includes Scala stdlib) 另外,您检查maven程序集是否还包含jar中的Scala stdlib(默认情况下, sbt assembly包括Scala stdlib)

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

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