hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dere <>
Subject Re: Issue with windowing function UDAF registeration
Date Thu, 04 Dec 2014 23:40:32 GMT
Hi Wesley,

Sorry for the late response on this .. is it true you saw this work on a different version
(later) of Hive? Based on what I think should be the problem, this would still be an issue
in later versions of Hive.

Looks like the error may be occurring because the Hive is trying to look up the UDF by name
during the UDF initialization in the reduce task. Ideally this lookup should only be happening
during the compilation phase and not during the map/reduce tasks.  This looks like it works
ok for built-in windowing UDFs (added to the FunctionRegistry), but custom UDFs are hitting
some other logic that really should only happen during compilation. We would have to fix the
way WindowingTableFunction is doing its initialization for this to work with UDFs added with

If you're building your own Hive, a workaround would be to add your custom windowing UDAF
to the FunctionRegistry.

On Nov 26, 2014, at 7:35 PM, wesley dias <> wrote:

> Hi,
> While executing a simple select query using a custom windowing UDAF I created I am constantly
running into this error.
> Error: java.lang.RuntimeException: Error in configuring object
>         at org.apache.hadoop.util.ReflectionUtils.setJobConf(
>         at org.apache.hadoop.util.ReflectionUtils.setConf(
>         at org.apache.hadoop.util.ReflectionUtils.newInstance(
>         at org.apache.hadoop.mapred.ReduceTask.runOldReducer(
>         at
>         at org.apache.hadoop.mapred.YarnChild$
>         at Method)
>         at
>         at
>         at org.apache.hadoop.mapred.YarnChild.main(
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>         at java.lang.reflect.Method.invoke(
>         at org.apache.hadoop.util.ReflectionUtils.setJobConf(
>         ... 9 more
> Caused by: java.lang.RuntimeException: Reduce operator initialization failed
>         at
>         ... 14 more
> Caused by: java.lang.NullPointerException
>         at org.apache.hadoop.hive.ql.exec.FunctionRegistry.getFunctionInfo(
>         at org.apache.hadoop.hive.ql.exec.FunctionRegistry.getWindowFunctionInfo(
>         at org.apache.hadoop.hive.ql.udf.ptf.WindowingTableFunction.streamingPossible(
>         at org.apache.hadoop.hive.ql.udf.ptf.WindowingTableFunction.setCanAcceptInputAsStream(
>         at org.apache.hadoop.hive.ql.udf.ptf.WindowingTableFunction.initializeStreaming(
>         at org.apache.hadoop.hive.ql.exec.PTFOperator$PTFInvocation.initializeStreaming(
>         at org.apache.hadoop.hive.ql.exec.PTFOperator.initializeOp(
>         at org.apache.hadoop.hive.ql.exec.Operator.initialize(
>         at org.apache.hadoop.hive.ql.exec.Operator.initialize(
>         at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(
>         at org.apache.hadoop.hive.ql.exec.ExtractOperator.initializeOp(
>         at org.apache.hadoop.hive.ql.exec.Operator.initialize(
>         at
>         ... 14 more
> Just wanted to check if any of you have faced this earlier. Also when I try to run the
Custom UDAF on another server it works fine. The only difference I can see it that the hive
version I am using on my local machine is 0.13.1 where it is working and on the other machine
it is 0.13.0 where I see the above mentioned error. I am not sure if this was a bug which
was fixed in the later release but I just wanted to confirm the same.
> Regards,
> Wesley

NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

View raw message