在mongo-hadoop中运行mapreduce示例时出现异常

时间:2015-02-23 10:15:57

标签: python mongodb hadoop mapreduce

在尝试运行示例时,它显示了一些异常。我已经引用了以下链接以供参考

http://docs.mongodb.org/ecosystem/tutorial/getting-started-with-hadoop/

如下例外,

 hduser@adminpc:/mongo-hadoop$ sudo ./gradlew jar testJar historicalYield
[sudo] password for hduser: 
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:core:compileJava UP-TO-DATE
:core:processResources UP-TO-DATE
:core:classes UP-TO-DATE
:core:jar UP-TO-DATE
:examples/enron:compileJava UP-TO-DATE
:examples/enron:processResources UP-TO-DATE
:examples/enron:classes UP-TO-DATE
:examples/enron:jar UP-TO-DATE
:examples/sensors:compileJava UP-TO-DATE
:examples/sensors:processResources UP-TO-DATE
:examples/sensors:classes UP-TO-DATE
:examples/sensors:jar UP-TO-DATE
:examples/treasury_yield:compileJava UP-TO-DATE
:examples/treasury_yield:processResources UP-TO-DATE
:examples/treasury_yield:classes UP-TO-DATE
:examples/treasury_yield:jar UP-TO-DATE
:flume:compileJava UP-TO-DATE
:flume:processResources UP-TO-DATE
:flume:classes UP-TO-DATE
:flume:jar UP-TO-DATE
:hive:compileJava UP-TO-DATE
:hive:processResources UP-TO-DATE
:hive:classes UP-TO-DATE
:hive:jar UP-TO-DATE
:integration-tests:compileJava UP-TO-DATE
:integration-tests:processResources UP-TO-DATE
:integration-tests:classes UP-TO-DATE
:integration-tests:jar UP-TO-DATE
:pig:compileJava UP-TO-DATE
:pig:processResources UP-TO-DATE
:pig:classes UP-TO-DATE
:pig:jar UP-TO-DATE
:streaming:compileJava
:streaming:processResources UP-TO-DATE
:streaming:classes
:streaming:jar UP-TO-DATE
:core:compileTestJava UP-TO-DATE
:core:processTestResources UP-TO-DATE
:core:testClasses UP-TO-DATE
:core:testsJar UP-TO-DATE
:examples/enron:compileTestJava UP-TO-DATE
:examples/enron:processTestResources UP-TO-DATE
:examples/enron:testClasses UP-TO-DATE
:examples/enron:testsJar UP-TO-DATE
:examples/sensors:compileTestJava UP-TO-DATE
:examples/sensors:processTestResources UP-TO-DATE
:examples/sensors:testClasses UP-TO-DATE
:examples/sensors:testsJar UP-TO-DATE
:examples/treasury_yield:compileTestJava
:examples/treasury_yield:processTestResources UP-TO-DATE
:examples/treasury_yield:testClasses
:examples/treasury_yield:testsJar UP-TO-DATE
:flume:compileTestJava UP-TO-DATE
:flume:processTestResources UP-TO-DATE
:flume:testClasses UP-TO-DATE
:flume:testsJar UP-TO-DATE
:hive:compileTestJava UP-TO-DATE
:hive:processTestResources UP-TO-DATE
:hive:testClasses UP-TO-DATE
:hive:testsJar UP-TO-DATE
:integration-tests:compileTestJava UP-TO-DATE
:integration-tests:processTestResources UP-TO-DATE
:integration-tests:testClasses UP-TO-DATE
:integration-tests:testsJar UP-TO-DATE
:pig:compileTestJava UP-TO-DATE
:pig:processTestResources
:pig:testClasses
:pig:testsJar UP-TO-DATE
:streaming:compileTestJava UP-TO-DATE
:streaming:processTestResources UP-TO-DATE
:streaming:testClasses UP-TO-DATE
:streaming:testsJar UP-TO-DATE
:installHadoop
:installHive
:installPig
:copyFiles
Updating mongo jars
Updating cluster configuration
:startCluster FAILED

 FAILURE: Build failed with an exception.

 * Where:
 Script '/mongo-hadoop/gradle/hadoop.gradle' line: 96

 * What went wrong:
 Execution failed for task ':startCluster'.
> Cannot convert the provided notation to a File or URI: false.
The following types/formats are supported:
- A String or CharSequence path, e.g 'src/main/java' or '/usr/include'
- A String or CharSequence URI, e.g 'file:/usr/include'
- A File instance.
- A URI or URL instance.

* Try:
 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

请帮我解决这个问题。

感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

我怀疑您可能遇到this commit

修复的问题
* Where:
 Script '/mongo-hadoop/gradle/hadoop.gradle' line: 96

基本上 - 错误消息告诉您脚本在hadoop.gradle的第96行失败。如果您查看此文件(本地或on the mongodb github),您会看到它正在尝试删除hadoop-tmpdir。错误消息进一步告诉您它无法解析传递给文件的参数。

请注意,github上的最新提交称为"Fix gradle delete for hadoop-tmpdir"

尝试编辑你的hadoop.gradle以匹配当前在git上签入的那个。