2 u012810317 u012810317 于 2016.03.08 12:44 提问

急,求高手!!hive在向整合hbase的分区表插入数据时报错:Must specify table

hadoop版本:hadoop-2.7.12.7.1
hbase版本:hbase-1.1.2
hive版本:apache-hive-2.0.0-bin

本人是新手,在整合了hive和hbase之后,我在hive中创建了一张关联了hbase表的分区表,然后在向表插入数据的时候报错了,下面是插入语句和报错,求懂的人解答。
visited_in_hive是关联了hbase表,准备插入数据的表;hv_c_hb是hive中的另一张表(不是分区表),里面有数据,而且字段和visited_in_hive一样。
插入语句:insert into table visited_in_hive partition (datetime='2016-03-05') select * from hv_c_hb;

报错:WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
Query ID = test2_20160308092429_26a93c7c-b945-4329-98ff-47a4067b579d
Total jobs = 3
Launching Job 1 out of 3
Number of reduce tasks is set to 0 since there's no reduce operator
java.io.IOException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.IllegalArgumentException: Must specify table name
at org.apache.hadoop.hive.ql.exec.FileSinkOperator.checkOutputSpecs(FileSinkOperator.java:1106)
at org.apache.hadoop.hive.ql.io.HiveOutputFormatImpl.checkOutputSpecs(HiveOutputFormatImpl.java:67)
at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:268)
at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:139)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:1287)
at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:575)
at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:570)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:570)
at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:561)
at org.apache.hadoop.hive.ql.exec.mr.ExecDriver.execute(ExecDriver.java:432)
at org.apache.hadoop.hive.ql.exec.mr.MapRedTask.execute(MapRedTask.java:138)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:158)
at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:101)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1840)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1584)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1361)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1184)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1172)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:233)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:184)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:400)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:778)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:717)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:645)
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:497)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.IllegalArgumentException: Must specify table name
at org.apache.hadoop.hive.ql.exec.FileSinkOperator.createHiveOutputFormat(FileSinkOperator.java:1128)
at org.apache.hadoop.hive.ql.exec.FileSinkOperator.checkOutputSpecs(FileSinkOperator.java:1103)
... 37 more
Caused by: java.lang.IllegalArgumentException: Must specify table name
at org.apache.hadoop.hbase.mapreduce.TableOutputFormat.setConf(TableOutputFormat.java:188)
at org.apache.hive.common.util.ReflectionUtil.setConf(ReflectionUtil.java:101)
at org.apache.hive.common.util.ReflectionUtil.newInstance(ReflectionUtil.java:87)
at org.apache.hadoop.hive.ql.io.HiveFileFormatUtils.getHiveOutputFormat(HiveFileFormatUtils.java:300)
at org.apache.hadoop.hive.ql.io.HiveFileFormatUtils.getHiveOutputFormat(HiveFileFormatUtils.java:290)
at org.apache.hadoop.hive.ql.exec.FileSinkOperator.createHiveOutputFormat(FileSinkOperator.java:1126)
... 38 more
Job Submission failed with exception 'java.io.IOException(org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.IllegalArgumentException: Must specify table name)'
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

它报的错是没有指定表名,但是语句里明明已经指定表名了啊。难道是版本问题????求高手解答。

1个回答

devmiao
devmiao   Ds   Rxr 2016.03.08 12:47
baidu_35779931
baidu_35779931 回复C-Q-D: 你的问题解决了吗?我现在也报这个错
接近 2 年之前 回复
u012810317
u012810317 我的和那个不同,我只有插入到分区表才会报错,不是分区的可以正常插入。
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
hive与hbase的整合时错误
当利用hive来管理hbase时,出现如下错误: java.io.IOException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.IllegalArgumentException: Must specify table name at org.apache.hadoop.hive.ql.exec.F
hive和hbase整合知识总结
参考资料 http://lxw1234.com/archives/2015/06/319.htm   https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration http://blog.csdn.net/wulantian/article/details/38111683 1.hiv
Hive与HBase整合
Hive HBase Integration Hive HBase Integration Avro Data Stored in HBase Columns IntroductionStorage HandlersUsageColumn Mapping Multiple Columns and FamiliesHive MAP to HBase C
hbase与hive整合遇见的问题
1、环境说明 Cenos6.5、hadoop-2.6.0、hbase-1.1.2、hive-1.2.1和zookeeper-3.4.6 2、整个hbase与hive前的准备工作 1)搭建hadoop集群 2)搭建zookeeper集群 3)搭建habse集群 4)安装hive(实验换境只是在集群的的Master节点安装了hive) 5)更换hive的检索引擎,更换成MySql 3、
HIVE的分区、hive关联Hbase、UDF函数
Hive and HDFS 原始数据 //建立hive和Hdfs的外部关联表 CREATE EXTERNAL TABLE people(id int,sex string,name string) partitioned by (logdate string,hour string) row forma
hive 分区partition表 创建 数据导入(动态分区插入、静态分区插入、动静态混合插入)
学习《hive 编程指南》一书,整理的知识,所以文章例子出自此书。 分区创建与数据导入的步骤: 1.创建分区表(以外部分区表为例)       create external table if not exists dividends(         ymd string,         dividend string)      partitioned by (ex_ch
Hive动态分区与建表、插入数据操作
1、定义 动态分区指不需要为不同的分区添加不同的插入语句,分区不确定,需要从数据中获取。 set hive.exec.dynamic.partition=true;//使用动态分区 (可通过这个语句查看:set hive.exec.dynamic.partition;)  set hive.exec.dynamic.partition.mode=nonstrict;//无限制模式 如果
hive与hbase整合过程
hive与hbase整合过程---coco # by coco # 2014-07-25  本文主要实现一下目标:    1. 在hive中创建的表能直接创建保存到hbase中。    2. hive中的表插入数据,插入的数据会同步更新到hbase对应的表中。    3. hbase对应的列簇值变更,也会在Hive中对应的表中变更。    4. 实现了多列,多列簇的转
HBase与hive整合出现的问题与解决方案
hive整合hbase时,创建hive表语句的时候没有错误但是报错 hive语句 create external table event_logs_20151220(key string, pl string, ver string, s_time string, u_ud string, u_sd string, en string) stored by 'org.apache.hadoo
Hive HBase Integration
HBaseIntegration Skip to end of metadata Created by Confluence Administrator, last modified by Alexander Pivovarov on Feb 26, 2016 Go to start of metadata Hive HBase Integration