Sorry for the delayed response.
Brendan,
I tried the last line both exactly as written and substituting the
full directory path and machine name; they gave the same error.
I am running the script from ~/mongodb/mongo-hadoop (where "examples"
is a subdirectory), and have specified the full path for all of the
jars that I register.
Not sure which version of Cloudera, I've asked our cluster
administrator. Hadoop version is 0.20.2.
Full stack trace of the error message from the pig log file:
Backend error message
---------------------
Error: com.mongodb.Mongo.<init>(Lcom/mongodb/MongoURI;)V
Pig Stack Trace
---------------
ERROR 2999: Unexpected internal error. Wrong FS:
mongodb://usredhdp00-priv/home/CONCUR/andreal/mongodata/test.pig.output,
expected: hdfs://usredhdp00-priv
java.lang.IllegalArgumentException: Wrong FS:
mongodb://usredhdp00-priv/home/CONCUR/andreal/mongodata/test.pig.output,
expected: hdfs://usredhdp00-priv
at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:385)
at
org.apache.hadoop.hdfs.DistributedFileSystem.checkPath(DistributedFileSystem.java:
106)
at
org.apache.hadoop.hdfs.DistributedFileSystem.getPathName(DistributedFileSystem.java:
162)
at
org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:
515)
at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:723)
at org.apache.pig.StoreFunc.cleanupOnFailureImpl(StoreFunc.java:172)
at org.apache.pig.StoreFunc.cleanupOnFailure(StoreFunc.java:158)
at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:
1012)
at org.apache.pig.PigServer.execute(PigServer.java:1000)
at org.apache.pig.PigServer.access$100(PigServer.java:112)
at org.apache.pig.PigServer$Graph.execute(PigServer.java:1252)
at org.apache.pig.PigServer.executeBatch(PigServer.java:324)
at
org.apache.pig.tools.grunt.GruntParser.executeBatch(GruntParser.java:
110)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:
167)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:
139)
at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:89)
at org.apache.pig.Main.main(Main.java:414)