将从一个表查询结果插入到一个分区表时,有时会在Load data步骤出错,这是在执行语句前没切换到目标表所在的库导致。
所以在执行插入语句前,先用use databasename切换到目标表所在的库下就正常了。
——————————以下是出错语句示例————————————
$ hive
Logging initialized using configuration in jar:file:/data/opt/hive-0.8.1/lib/hive-common-0.8.1.jar!/hive-log4j.properties
Hive history file=/tmp/hadoop/hive_job_log_hadoop_201302171019_1202642080.txt
hive> INSERT OVERWRITE TABLE dw1.t_test PARTITION(f_day)
> SELECT f_prod_id, f_uuid_prod, f_uuid_channel, f_uuid, f_cost, f_day
> FROM dw0.t_test
> WHERE f_day >= '2013-02-02' and f_day<= '2013-02-03'
> DISTRIBUTE BY f_day;
Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks not specified. Estimated from input data size: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
set mapred.reduce.tasks=<number>
Starting Job = job_201206261006_347586, Tracking URL = http://master:50030/jobdetails.jsp?jobid=job_201206261006_347586
Kill Command = /data/opt/hadoop/bin/hadoop job -Dmapred.job.tracker=master:9001 -kill job_201206261006_347586
Hadoop job information for Stage-1: number of mappers: 13; number of reducers: 1
2013-02-17 14:03:37,377 Stage-1 map = 0%, reduce = 0%
2013-02-17 14:03:39,396 Stage-1 map = 8%, reduce = 0%, Cumulative CPU 1.21 sec
2013-02-17 14:03:40,405 Stage-1 map = 54%, reduce = 0%, Cumulative CPU 12.34 sec
2013-02-17 14:03:41,412 Stage-1 map = 92%, reduce = 0%, Cumulative CPU 26.6 sec
2013-02-17 14:03:42,419 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 29.29 sec
2013-02-17 14:03:43,426 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 29.29 sec
2013-02-17 14:03:44,433 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 29.29 sec
2013-02-17 14:03:45,440 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 29.29 sec
2013-02-17 14:03:46,447 Stage-1 map = 100%, reduce = 33%, Cumulative CPU 29.29 sec
2013-02-17 14:03:47,455 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 31.7 sec
2013-02-17 14:03:48,462 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 31.7 sec
MapReduce Total cumulative CPU time: 31 seconds 700 msec
Ended Job = job_201206261006_347586
Loading data to table dw1.t_test partition (f_day=null)
Deleted hdfs://master/data/dw1/test/f_day=20130202
Failed with exception java.lang.ClassCastException: org.apache.hadoop.hive.metastore.api.InvalidOperationException cannot be cast to java.lang.RuntimeException
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask
MapReduce Jobs Launched:
Job 0: Map: 13 Reduce: 1 Accumulative CPU: 31.7 sec HDFS Read: 71311348 HDFS Write: 14213 SUCESS
Total MapReduce CPU Time Spent: 31 seconds 700 msec
相关推荐
Caused by: java.sql.SQLException: java.lang.ClassNotFoundException: org.apache.hive.jdbc.HiveDriver at com.trs.gateway.commons.hive.HiveFeature.getConnection(HiveFeature.java:57) at ...
含两个文件hive-jdbc-3.1.2-standalone.jar和apache-hive-3.1.2-bin.tar.gz 含两个文件hive-jdbc-3.1.2-standalone.jar和apache-hive-3.1.2-bin.tar.gz 含两个文件hive-jdbc-3.1.2-standalone.jar和apache-hive-...
Caused by: java.sql.SQLException: java.lang.ClassNotFoundException: org.apache.hive.jdbc.HiveDriver at com.trs.gateway.commons.hive.HiveFeature.getConnection(HiveFeature.java:57) at ...
apache-hive-3.1.2-bin.tar.gz, 下载自:https://mirrors.bfsu.edu.cn/apache/hive/hive-3.1.2/, 上传至CSDN备份,本资源下载后需要解压缩zip文件,才是原本的apache-hive-3.1.2-bin.tar.gz文件
被编译的hive-hbase-handler-1.2.1.jar,用于在Hive中创建关联HBase表的jar,解决创建Hive关联HBase时报FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.apache.hadoop....
apache-hive-2.1.0-bin.tar.gz apache-hive-2.1.0-bin.tar.gz
hive-jdbc-uber-2.6.5.0-292.jar 驱动下载,hive-jdbc-uber-2.6.5.0-292.jar,hive-jdbc-uber-2.6.5.0-292.jar
Hive连接的jar包——hive-jdbc-3.1.2-standalone.jar,使用数据库连接软件连接数据仓库时需要使用相应的驱动器驱动,希望对大家有所帮助
hive-jdbc-uber-2.6.5.0-292.jar驱动
hive客户端工具DBever连接时所使用的驱动,hive-jdbc-uber-2.6.5.0-292.jar,hive-jdbc-uber-2.6.5.0-292.jar,hive-jdbc-uber-2.6.5.0-292.jar
apache-hive-2.3.3-bin.tar.gz
为解决hive安全问题,重新编译hive源码升级jetty到9.4.24.v20191120
apache-hive-0.14.0-bin.tar.gz apache-hive-0.14.0-bin.tar.gz
apache-hive-2.3.0-bin.tar.gz
Linux系统 大数据开发 apache-hive-1.2.2-bin.tar.gz
从Hive官网下载的最新版apache-hive-3.1.0-bin.tar.gz安装包,需要的朋友拿走
hive_jdbc_2.6.2.1002
apache-hive-2.1.1-bin.tar.gz下的bin文件夹,包含hive.cmd
hive-jdbc-uber-2.6.5.0-292.jar DbVisualizer (as of version 9.5.5) Below is an example configuration using DbVisualizer: Open the Diver Manager dialog ("Tools" > "Driver Manager...") and hit the ...