Re: slow performance when using udf

2011-08-15 Thread wd
Finally, the flowing code get no performance lose. I think the point is to avoid to use the getString method, Thanks everyone again. //import org.apache.hadoop.hive.ql.udf.generic.GenericUDF; import org.apache.hadoop.hive.ql.exec.UDF; import org.apache.hadoop.io.Text; import java.net.URLDecoder;

Re: slow performance when using udf

2011-08-15 Thread wd
Thanks for all your advise, I'll try it out. On Mon, Aug 15, 2011 at 9:02 PM, Edward Capriolo wrote: > > > On Monday, August 15, 2011, Carl Steinbach wrote: >> Converting it to a GenericUDF (i.e. extending GenericUDF instead of UDF) >> should help some with performance. >> On Mon, Aug 15, 2011 a

Re: slow performance when using udf

2011-08-15 Thread Edward Capriolo
On Monday, August 15, 2011, Carl Steinbach wrote: > Converting it to a GenericUDF (i.e. extending GenericUDF instead of UDF) should help some with performance. > On Mon, Aug 15, 2011 at 1:49 AM, wd wrote: >> >> hi, >> >> I create a udf to decode urlencoded things, but found the speed for >> mapre

Re: slow performance when using udf

2011-08-15 Thread Carl Steinbach
Converting it to a GenericUDF (i.e. extending GenericUDF instead of UDF) should help some with performance. On Mon, Aug 15, 2011 at 1:49 AM, wd wrote: > hi, > > I create a udf to decode urlencoded things, but found the speed for > mapred is 3 times(73sec -> 213 sec) as before. How to optimize it

slow performance when using udf

2011-08-15 Thread wd
hi, I create a udf to decode urlencoded things, but found the speed for mapred is 3 times(73sec -> 213 sec) as before. How to optimize it? package com.test.hive.udf; import org.apache.hadoop.hive.ql.exec.UDF; import java.net.URLDecoder; public final class urldecode extends UDF { public Str