我正在尝试在hbase表的顶部创建配置单元表。使用上述查询进行相同的查询。
create external table MaprDB_batch_info_table (Batch_ID string, BatchParserJobId string, count string, CurrentRunTime string)
ROW FORMAT SERDE 'org.apache.hadoop.hive.hbase.HBaseSerDe' STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,BatchInfo:BatchParserJobId,BatchInfo:count,BatchInfo:CurrentRunTime") TBLPROPERTIES ('hbase.table.name' = '/user/all/batchinfo');
此命令在hiveshell中成功执行,但当我尝试通过bashshell执行时
hive -e "create external table MaprDB_batch_info_table (Batch_ID string, BatchParserJobId string, count string, CurrentRunTime string)
ROW FORMAT SERDE 'org.apache.hadoop.hive.hbase.HBaseSerDe' STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,BatchInfo:BatchParserJobId,BatchInfo:count,BatchInfo:CurrentRunTime") TBLPROPERTIES ('hbase.table.name' = '/user/all/batchinfo');
我得到以下错误:
org.apache.hadoop.hive.ql.parse.hiveparser.tablepropertieslist(hiveparser)上的noviablealtexception(26@[])。java:34375)在org.apache.hadoop.hive.ql.parse.hiveparser.tableproperties(hiveparser。java:34243)在org.apache.hadoop.hive.ql.parse.hiveparser.tablefileformat(hiveparser。java:35913)在org.apache.hadoop.hive.ql.parse.hiveparser.createtablestatement(hiveparser。java:5380)在org.apache.hadoop.hive.ql.parse.hiveparser.ddlstatement(hiveparser.com)上。java:2640)在org.apache.hadoop.hive.ql.parse.hiveparser.execstatement(hiveparser。java:1650)在org.apache.hadoop.hive.ql.parse.hiveparser.statement(hiveparser。java:1109)在org.apache.hadoop.hive.ql.parse.parsedriver.parse(parsedriver。java:202)在org.apache.hadoop.hive.ql.parse.parsedriver.parse(parsedriver。java:166)在org.apache.hadoop.hive.ql.driver.compile(driver。java:397)在org.apache.hadoop.hive.ql.driver.compile(driver。java:309)位于org.apache.hadoop.hive.ql.driver.compileinternal(驱动程序。java:1146)在org.apache.hadoop.hive.ql.driver.runinternal(驱动程序。java:1194)在org.apache.hadoop.hive.ql.driver.run(driver。java:1083)在org.apache.hadoop.hive.ql.driver.run(driver。java:1073)在org.apache.hadoop.hive.cli.clidriver.processlocalcmd(clidriver。java:213)在org.apache.hadoop.hive.cli.clidriver.processcmd(clidriver。java:165)在org.apache.hadoop.hive.cli.clidriver.processline(clidriver。java:376)在org.apache.hadoop.hive.cli.clidriver.processline(clidriver。java:311)在org.apache.hadoop.hive.cli.clidriver.executedriver(clidriver。java:708)在org.apache.hadoop.hive.cli.clidriver.run(clidriver。java:681)位于org.apache.hadoop.hive.cli.clidriver.main(clidriver。java:621)在sun.reflect.nativemethodaccessorimpl.invoke0(本机方法)位于sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl)。java:62)在sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl。java:43)在java.lang.reflect.method.invoke(方法。java:497)在org.apache.hadoop.util.runjar.run(runjar。java:221)在org.apache.hadoop.util.runjar.main(runjar。java:136)失败:parseexception行1:473无法识别“hbase”附近的输入。“表属性列表中的“columns”
如果有人能帮忙纠正这个问题,请。
1条答案
按热度按时间tyg4sfes1#
更换
"
在查询中'
```...('hbase.columns.mapping'=':key,BatchInfo:BatchParserJobId,BatchInfo:count,BatchInfo:CurrentRunTime')...