简体   繁体   English

Gradle:由于缺少jar,所以无法建立级联配置单元

[英]Gradle: cascading-hive won't build due to missing jar

I'm trying to build a Cascading job that uses Hive to perform some of the transformations. 我正在尝试建立一个使用Hive执行一些转换的层叠工作。 The cascading-hive project seems like a great starting point. 级联配置单元项目似乎是一个很好的起点。 I'm running Gradle 2.6 and Java 1.8. 我正在运行Gradle 2.6和Java 1.8。 Per the documentation, I ran the following: 根据文档,我运行了以下内容:

git clone https://github.com/Cascading/cascading-hive
cd cascading-hive
gradle install

Unfortunately, this returned an error. 不幸的是,这返回了一个错误。 A jar was missing from my local maven repo: 我的本地Maven存储库中缺少一个jar

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':testCompile'.
> Could not find hadoop-common-tests.jar (org.apache.hadoop:hadoop-common:2.6.0).
  Searched in the following locations:
      file:/Users/awoolford/.m2/repository/org/apache/hadoop/hadoop-common/2.6.0/hadoop-common-2.6.0-tests.jar

I searched for this jar on Maven Central and it was not there. 我在Maven Central上搜索了这个jar ,但它不在那里。

Can you see what needs to happen in order to build cascading-hive? 您能看到构建级联配置单元需要做什么吗?

Update 更新

I had a quick look in the jars provided by Cloudera, found their version of this jar (eg /opt/cloudera/parcels/CDH-5.4.4-1.cdh5.4.4.p0.4/jars/hadoop-common-2.6.0-cdh5.4.4-tests.jar ), and copied it to /Users/awoolford/.m2/repository/org/apache/hadoop/hadoop-common/2.6.0/hadoop-common-2.6.0-tests.jar . 我快速浏览了Cloudera提供的jar,找到了该jar的版本(例如/opt/cloudera/parcels/CDH-5.4.4-1.cdh5.4.4.p0.4/jars/hadoop-common-2.6.0-cdh5.4.4-tests.jar ),并将其复制到/Users/awoolford/.m2/repository/org/apache/hadoop/hadoop-common/2.6.0/hadoop-common-2.6.0-tests.jar gradle install now executes successfully, though this doesn't seem like a good general solution. gradle install现在可以成功执行,尽管这似乎不是一个很好的常规解决方案。

Hadoop does not seem to be correctly downloaded in the local repo. 似乎在本地存储库中未正确下载Hadoop。 I cannot pinpoint exactly what the exact problem in your case is. 我无法确切指出您的具体问题是什么。 See How can I force gradle to redownload dependencies? 请参阅如何强制gradle重新下载依赖项? for suggestions on how to purge. 有关如何清除的建议。

PS. PS。 The jar is available in the maven central repository. 该jar在Maven中央存储库中可用。 See http://search.maven.org/#artifactdetails%7Corg.apache.hadoop%7Chadoop-common%7C2.6.0%7Cjar 参见http://search.maven.org/#artifactdetails%7Corg.apache.hadoop%7Chadoop-common%7C2.6.0%7Cjar

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

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