Would probably have to see the whole code of your evaluate() function.
Is this while trying to use treat the arguments to the UDF as a String object? 
It was probably passed into the GenericUDF as a Text object (Hadoop Writable 
version of string type), not a String object. It would have to be converted to 
a String value.


On Aug 1, 2014, at 1:14 PM, Dan Fan <d...@appnexus.com> wrote:

> 
> Hi team 
> 
> Quick question. 
> 
> I am writing a hive generic UDF. 
> In which, I wanna have this:
> 
> HashMap<String, String> vpDefinition = new HashMap<String, String>() ; 
> vpDefinition.push(“auction_id”,”22”) ;  
> 
> The second line always give me FAILED: ClassCastException 
> org.apache.hadoop.io.Text cannot be cast to java.lang.String
> 
> When I run the generic udf in hive. 
> 
> Does anyone know how to deal with this issue ?  
> I do not understand that, why do I have this cannot cast error. 
> 
> Could anyone explain please ? 
> 
> Thanks 
> 
> Dan


-- 
CONFIDENTIALITY NOTICE
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.

Reply via email to