FAILED:ParseException第1:0行无法识别'hive'附近的输入 - ''e'

时间:2017-06-30 19:43:27

标签: hadoop hive hdfs

我在Hive中有不同的表。我想将每个表保存在制表符分隔文件中。我该怎么办?

如果我运行此命令,则会收到错误消息:

hive -e 'select * from myTable' > /home/mydata_tsv/myTable.tsv;

错误讯息:

NoViableAltException(26@[])
    at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1084)
    at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:202)
    at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
    at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:437)
    at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:320)
    at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1219)
    at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1260)
    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1156)
    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1146)
    at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:217)
    at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:169)
    at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:380)
    at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:740)
    at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:685)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
FAILED: ParseException line 1:0 cannot recognize input near 'hive' '-' 'e'

0 个答案:

没有答案