安装Netty时Apache Spark编译失败

时间:2014-03-18 00:31:38

标签: apache-spark

我们解开spark-0.9.0-incubating.tgz并尝试构建它以与纱线一起使用。

SPARK_HADOOP_VERSION=2.0.0-cdh4.6.0 SPARK_YARN=true sbt/sbt assembly

... [info]解析io.netty#netty-all; 4.0.13.Final ... [错误]服务器访问错误:连接超时url = https://oss.sonatype.org/content/repositories/snapshots/io/netty/netty-all/4.0.13.Final/netty-all-4.0.13.Final.pom [错误]服务器访问错误:连接超时url = https://oss.sonatype.org/service/local/staging/deploy/maven2/io/netty/netty-all/4.0.13.Final/netty-all-4.0.13.Final.pom ...

如果我只是将网址剪切粘贴到浏览器中,我会得到:

404 - ItemNotFoundException

Retrieval of /io/netty/netty-all/4.0.13.Final/netty-all-4.0.13.Final.pom from M2Repository(id=snapshots) is forbidden by repository policy SNAPSHOT.

org.sonatype.nexus.proxy.ItemNotFoundException: Retrieval of /io/netty/netty-all/4.0.13.Final/netty-all-4.0.13.Final.pom from M2Repository(id=snapshots) is forbidden by repository policy SNAPSHOT.
    at org.sonatype.nexus.proxy.maven.AbstractMavenRepository.doRetrieveItem(AbstractMavenRepository.java:380)
    at org.sonatype.nexus.proxy.maven.maven2.M2Repository.doRetrieveItem(M2Repository.java:396)
    at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:765)
    at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:608)
    at org.sonatype.nexus.proxy.router.DefaultRepositoryRouter.retrieveItem(DefaultRepositoryRouter.java:155)
    at org.sonatype.nexus.web.content.NexusContentServlet.doGet(NexusContentServlet.java:359)
    at org.sonatype.nexus.web.content.NexusContentServlet.service(NexusContentServlet.java:331)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)

我已经在很多地方看到了这个报道但没有解决方案。这是错误,因为我们是在公司防火墙后面,还是由于其他原因?请指教。

1 个答案:

答案 0 :(得分:0)

我将代理集设置为环境变量,但看起来它们没有被拾取。在sbt中添加它们直接为我工作。

编辑$ SPARK_HOME / sbt / sbt

例如,

EXTRA_ARGS =“ - Dhttp.proxySet = true -Dhttp.proxyHost = myproxy.mycompany.com -Dhttp.proxyPort = 80 -Dhttps.proxySet = true -Dhttps.proxyHost = myproxy.mycompany.com -Dhttps.proxyPort = 80 -Dftp.proxySet = true -Dftp.proxyHost = myproxy.mycompany.com -Dftp.proxyPort = 80 -Dhttp.nonProxyHosts = mydomain -Dhttps.nonProxyHosts = mydomain -Dftp.nonProxyHosts = mydomain“