hive 中出现struct 结构化的问题

如果你使用udf,udaf,udtf中的某一个并且查询日志中出现如下之类的struct错误

 

java.lang.RuntimeException: Error in configuring object
	at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:104)
	at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:74)
	at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)
	at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:128)
	at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:370)
	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:324)
	at org.apache.hadoop.mapred.Child.main(Child.java:165)
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(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:99)
	... 6 more
Caused by: java.lang.RuntimeException: Error in configuring object
	at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:104)
	at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:74)
	at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)
	at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:128)
	at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:34)
	... 11 more
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(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:99)
	... 15 more
Caused by: java.lang.RuntimeException: Map operator initialization failed
	at org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:130)
	... 20 more
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Error: name expected at the position 67 of 'struct,mapl:map>,int>>,mapr:map>,int>>,sum:int>' but '>' is found.
	at org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.initializeOp(ReduceSinkOperator.java:129)
	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:351)
	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:427)
	at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:383)
	at org.apache.hadoop.hive.ql.exec.GroupByOperator.initializeOp(GroupByOperator.java:368)
	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:351)
	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:427)
	at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:383)
	at org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:62)
	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:351)
	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:427)
	at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:383)
	at org.apache.hadoop.hive.ql.exec.Operator.initializeOp(Operator.java:368)
	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:351)
	at org.apache.hadoop.hive.ql.exec.MapOperator.initializeOp(MapOperator.java:358)
	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:351)
	at org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:94)

 

那么请注意一下 编写的函数中是否如果是复合型数据结构,那么一定不要出现Character

转载于:https://www.cnblogs.com/MengYan-LongYou/p/3210189.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值