Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Accessing Table Properies from InputFormat

Copy link to this message
Accessing Table Properies from InputFormat

Hive 0.10.0 over Hadoop 1.0.4.

Further to my filtering questions of before.
I would like to be able to access the table properties from inside my custom InputFormat.
I've done searches and there seem to be some other people who have had a similar problem.
The closest I can see to a solution is to use
                MapredWork mrwork = Utilities.getMapRedWork(configuration);
but this fails for me with the error below.
I'm not truly surprised because I and trying to make sure that my query
runs without a map/reduce and some of the e-mails suggest that in this case:

"...no mapred job is
run, so this trick doesn't work (and instead, the Configuration object
can be used, since it's local)."

Any pointers would be very much appreciated.


java.lang.IllegalArgumentException: Can not create a Path from an empty string
                at org.apache.hadoop.fs.Path.checkPathArg(Path.java:82)
                at org.apache.hadoop.fs.Path.<init>(Path.java:90)
                at org.apache.hadoop.hive.ql.exec.Utilities.getHiveJobID(Utilities.java:382)
                at org.apache.hadoop.hive.ql.exec.Utilities.getMapRedWork(Utilities.java:205)
                at SimpleInputFormat.getThingy(SimpleInputFormat.java:134)
                at SimpleInputFormat.getSplits(SimpleInputFormat.java:90)
                at org.apache.hadoop.hive.ql.exec.FetchOperator.getRecordReader(FetchOperator.java:373)
                at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:486)
                at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:466)
                at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:136)
                at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:1387)
                at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:270)
                at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
                at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:412)
                at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:755)
                at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:613)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Failed with exception java.io.IOException:java.lang.RuntimeException: java.lang.IllegalArgumentException: Can not create a Path from an empty string

Peter Marron
Trillium Software UK Limited

Tel : +44 (0) 118 940 7609
Fax : +44 (0) 118 940 7699