Re: Casting

2016-01-11 Thread John Smith
Even when I do explicit casting im getting same error: sensitiveSet = foreach sensitiveSet generate (long) $0, (chararray) $1, (long) $2, (chararray) $3, (chararray) $4, (chararray) $5; On Mon, Jan 11, 2016 at 6:03 PM, John Smith wrote: > Hi, > > Im trying to dump relation into AVRO

Casting

2016-01-11 Thread John Smith
Hi, Im trying to dump relation into AVRO file but im getting strange error: org.apache.pig.data.DataByteArray cannot be cast to java.lang.CharSequence I dont use DataByteArray (bytearray), see description of the relation below. sensitiveSet: {rank_ID: long,name: chararray,customerId: long,VIN:

Pig: issues with casting a string to a boolean

2015-06-19 Thread Sameer Tilak
Hi All, I wrote a UDF that returns a string and here is a sample code: split data into purchased IF ((boolean) (myudf(param)), failed OTHERWISE; As an example, here is the example of that my udf returns:split data into purchased IF ((boolean) (retcode == 'SUCCESS')), failed OTHERWISE; Unfortunat

Re: Exception (possibly) due to type casting between bytearray to charray in HBaseStorage

2013-05-31 Thread Shahab Yunus
at > > java.net.URLClassLoader.findClass(URLClassLoader.java:190) > > > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > > > > > > at > > > > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > > > > >

Re: Exception (possibly) due to type casting between bytearray to charray in HBaseStorage

2013-05-31 Thread shashwat shriparv
ss(ClassLoader.java:247) > > > > > at java.lang.Class.forName0(Native Method) > > > > > at java.lang.Class.forName(Class.java:247) > > > > > > > > > > > > > > > events = LOAD 'hbase://events' >

Re: Exception (possibly) due to type casting between bytearray to charray in HBaseStorage

2013-05-31 Thread Shahab Yunus
> > events = LOAD 'hbase://events' > > > > USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('info:field1 > > > > info:field2 info:field3') > > > > AS (field1: chararray, field2:chararray, field3:chararray); > > > > It s

Re: Exception (possibly) due to type casting between bytearray to charray in HBaseStorage

2013-05-31 Thread Praveen Bysani
> > > AS (field1: chararray, field2:chararray, field3:chararray); > > > It seems to work if I use bytearray instead of chararray (or no type at > > > all.) > > > AS (field1: bytearray, field2:bytearray, field3:bytearray); > > > > > > or > > &

Re: Exception (possibly) due to type casting between bytearray to charray in HBaseStorage

2013-05-30 Thread Shahab Yunus
gt; > all.) > > AS (field1: bytearray, field2:bytearray, field3:bytearray); > > > > or > > > > AS (field1, field2, field3); > > > > My question is that why do we get the ClassNotFoundException for > > TableInpuFormat which is kind of misleading? Plus,

Re: Exception (possibly) due to type casting between bytearray to charray in HBaseStorage

2013-05-29 Thread Praveen Bysani
fo:field2 info:field3') > AS (field1: chararray, field2:chararray, field3:chararray); > It seems to work if I use bytearray instead of chararray (or no type at > all.) > AS (field1: bytearray, field2:bytearray, field3:bytearray); > > or > > AS (field1, field2, field3); >

Exception (possibly) due to type casting between bytearray to charray in HBaseStorage

2013-05-29 Thread Shahab Yunus
ion is that why do we get the ClassNotFoundException for TableInpuFormat which is kind of misleading? Plus, is it even type casting really the issue? Wouldn't automatic byte-to-char conversion happen? This issue has been discussed earlier also but it doesn't seem any conclusion was reache

UDF casting failures on nested maps/objects.

2013-05-07 Thread Kris Coward
Hi, I've got some objects originally loaded, using the JSON loader from elephantbird, into nested maps, and subsequently stored using LZOPigStorage after various stages of processing. When I subsequently load these nested maps, and pass them into a UDF for modification, pretty much any attempt to

Re: Casting parameters to custom LoadFunc (was RE: Restricting loading of log files based on parameter input)

2013-02-21 Thread Cheolsoo Park
A = LOAD '/foo/replace_me_with_regex' USING MyLoadFunc((int)$year, > (int)$month, (int)$day); > > This does, but it forces my LoadFunc to accept String parameters and do > the casting within: > > A = LOAD '/foo/replace_me_with_regex' USING MyLoadFunc('$year', > '$month', '$day'); > > Thanks, > Ian. >

Casting parameters to custom LoadFunc (was RE: Restricting loading of log files based on parameter input)

2013-02-21 Thread Stevens, Ian
A = LOAD '/foo/replace_me_with_regex' USING MyLoadFunc($year, $month, $day); A = LOAD '/foo/replace_me_with_regex' USING MyLoadFunc((int)$year, (int)$month, (int)$day); This does, but it forces my LoadFunc to accept String parameters and do the casting within:

Re: Casting unclean data.

2011-02-03 Thread Dmitriy Ryaboy
You have to write little checking udfs. In the future you'll just use the error handling feature (see wiki) to deal with this :) D On Thu, Feb 3, 2011 at 12:51 PM, Kris Coward wrote: > Hey there, > > I've just started butting heads against a problem where I'm trying to > cast bytearrays in cust

Casting unclean data.

2011-02-03 Thread Kris Coward
Hey there, I've just started butting heads against a problem where I'm trying to cast bytearrays in customer-provided data to integers. The overwhelming majority of the time, we seem to get actual integers, but I just had a job choke when one of these should-be-integers wasn't. Is there some sort