hive 报错 Caused by: java.lang.reflect.InvocationTargetException


向一个表的分区中插入数据时

报错

java.lang.RuntimeException: Error in configuring object at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:106) at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:72) at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:130) at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:469) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:447) at org.apache.hadoop.mapred.Child$4.run(Child.java:268) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408) at org.apache.hadoop.mapred.Child.main(Child.java:262) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc

sql语句如下

insert into table test_mid_pro_androidupdate partition(year='2013',month='09',day='29')                                                                                                                         
select 20130929, a.uid, a.vid, cityid, channelid, 1 
from (
			select  case when vid=1301 then 1237 when vid=1162 then 1154 else vid end as vid , uid, 
							case when collect_set(cityid)[0] is not null then collect_set(cityid)[0] else 0 end as cityid, 
							collect_set(channelid)[0] channelid 
			from (select  cast(vid as int) vid, uid, cast(cityid as int) cityid, 
										channelid, year, month, day 
						from pwd_act_user) c 
			where year=2013 and month=09 and day=29 
			and vid in (1162, 1154, 1237, 1301)
			group by uid, vid
			) a 
left outer join  
			(
				select id 
				from pwd_user_info 
				where crttime like '2013-09-29%'
			) b 
on (a.uid=b.id) where b.id is null;

单独执行 后面的select的语句没有出错,但是 加上第一句insert into 当map跑完后 跑reduce时就报错

你可能感兴趣的:(hive)