yc-huang / Hive-mongo

hive storage handler for connecting with MongoDB
Apache License 2.0
32 stars 33 forks source link

Exception #10

Closed ahmedtalhakhan closed 11 years ago

ahmedtalhakhan commented 11 years ago

I am trying to run the example usage;

hive --auxpath Hive-mongo/target/hive-mongo-0.0.1-SNAPSHOT-jar-with-dependencies.jar

The jar files are correctly loaded. But after creating the mongo_user table, I try to update that table as follows and get the following exception. Any idea why this wrong FileSystem error is occuring here?

hive> insert overwrite table mongo_users select id, name,age from test;

java.lang.IllegalArgumentException: Wrong FS: file://Hive-mongo/target/hive-mongo-0.0.1-SNAPSHOT-jar-with-dependencies.jar, expected: file:/// at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:381) at org.apache.hadoop.fs.RawLocalFileSystem.pathToFile(RawLocalFileSystem.java:55) at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:393) at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:251) at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:213) at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:163) at org.apache.hadoop.mapred.JobClient.copyRemoteFiles(JobClient.java:627) at org.apache.hadoop.mapred.JobClient.copyAndConfigureFiles(JobClient.java:730) at org.apache.hadoop.mapred.JobClient.copyAndConfigureFiles(JobClient.java:655) at org.apache.hadoop.mapred.JobClient.access$300(JobClient.java:174) at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:865) at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:416) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121) at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850) at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:824) at org.apache.hadoop.hive.ql.exec.ExecDriver.execute(ExecDriver.java:435) at org.apache.hadoop.hive.ql.exec.MapRedTask.execute(MapRedTask.java:137) at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:134) at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57) at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1326) at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1118) at org.apache.hadoop.hive.ql.Driver.run(Driver.java:951) at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:258) at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:215) at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:406) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:689) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:557) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.hadoop.util.RunJar.main(RunJar.java:156) Job Submission failed with exception 'java.lang.IllegalArgumentException(Wrong FS: file://Hive-mongo/target/hive-mongo-0.0.1-SNAPSHOT-jar-with-dependencies.jar, expected: file:///)' FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MapRedTask

yc-huang commented 11 years ago

would you pls try to use absolute file path, e.g. hive --auxpath _./_Hive-mongo/target/hive-mongo-0.0.1-SNAPSHOT-jar-with- dependencies.jar

On Monday, February 18, 2013, ahmedtalhakhan wrote:

I am trying to run the example usage;

hive --auxpath Hive-mongo/target/hive-mongo-0.0.1-SNAPSHOT-jar-with-dependencies.jar

The jar files are correctly loaded. But after creating the mongo_user table, I try to update that table as follows and get the following exception. Any idea why this wrong FileSystem error is occuring here?

hive> insert overwrite table mongo_users select id, name,age from test;

java.lang.IllegalArgumentException: Wrong FS: file://Hive-mongo/target/hive-mongo-0.0.1-SNAPSHOT-jar-with-dependencies.jar, expected: file:/// at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:381) at org.apache.hadoop.fs.RawLocalFileSystem.pathToFile(RawLocalFileSystem.java:55) at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:393) at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:251) at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:213) at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:163) at org.apache.hadoop.mapred.JobClient.copyRemoteFiles(JobClient.java:627) at org.apache.hadoop.mapred.JobClient.copyAndConfigureFiles(JobClient.java:730) at org.apache.hadoop.mapred.JobClient.copyAndConfigureFiles(JobClient.java:655) at org.apache.hadoop.mapred.JobClient.access$300(JobClient.java:174) at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:865) at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:416) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121) at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850) at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:824) at org.apache.hadoop.hive.ql.exec.ExecDriver.execute(ExecDriver.java:435) at org.apache.hadoop.hive.ql.exec.MapRedTask.execute(MapRedTask.java:137) at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:134) at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57) at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1326) at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1118) at org.apache.hadoop.hive.ql.Driver.run(Driver.java:951) at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:258) at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:215) at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:406) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:689) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:557) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.hadoop.util.RunJar.main(RunJar.java:156) Job Submission failed with exception 'java.lang.IllegalArgumentException(Wrong FS: file://Hive-mongo/target/hive-mongo-0.0.1-SNAPSHOT-jar-with-dependencies.jar, expected: file:///)' FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MapRedTask

— Reply to this email directly or view it on GitHubhttps://github.com/yc-huang/Hive-mongo/issues/10.

ahmedtalhakhan commented 11 years ago

Thanks. Worked perfectly. I will close this