AnsweredAssumed Answered

Hive variables on command line

Question asked by vincent on Dec 17, 2015
I'm following this instructions - https://www.mapr.com/blog/quick-tips-using-hive-shell-inside-scripts

I'm trying like below:
hive -hivevar cal_month_end='2012-01-01' -f Test_var.sql

But I keep getting below error:
Error: java.lang.IllegalArgumentException: Can not create a Path from an empty string
        at org.apache.hadoop.fs.Path.checkPathArg(Path.java:131)
        at org.apache.hadoop.fs.Path.<init>(Path.java:139)
        at org.apache.hadoop.hive.ql.io.HiveInputFormat$HiveInputSplit.getPath(HiveInputFormat.java:110)
        at org.apache.hadoop.mapred.MapTask.updateJobWithSplit(MapTask.java:463)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:411)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:347)
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:167)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1469)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)

Any ideas? Thanks.

Outcomes