Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> Unable to typecast fields loaded from HBase


+
Praveen Bysani 2013-03-27, 08:29
+
Praveen Bysani 2013-03-28, 04:20
Copy link to this message
-
Re: Unable to typecast fields loaded from HBase
Your initial exception shows ClassNotFoundExceptions for HBase. Are you
adding HBase to PIG_CLASSPATH on the client or do you have it installed on
your Hadoop nodes? In the case of the latter, maybe some nodes are
different than others?
On Wed, Mar 27, 2013 at 9:20 PM, Praveen Bysani <[EMAIL PROTECTED]>wrote:

> This is not about casting types. The scripts work sometime without any
> issue and fails with the error as i specified before ? I have no clue of
> what might be the issue ? Network probably ? I run my cluster on VPS
> machines, running CDH 4.2 that is installed using cloudera Manager. I am
> running pig version 0.10.1 which is installed as parcel.
>
> On 27 March 2013 16:29, Praveen Bysani <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I am unable to typecast fields loaded from my hbase to anything other
> than
> > default bytearray. I tried both during the LOAD statement and using
> > typecast after loading. Neither works. The script works when i load the
> > data as below,
> > records = LOAD 'hbase://hantu' USING
> > org.apache.pig.backend.hadoop.hbase.HBaseStorage('v:member v:guest') as
> > (member, guest);
> > records_limit = LIMIT records 10;
> > DUMP records_limit;
> >
> > But when i change the first line to ,
> > records = LOAD 'hbase://hantu' USING
> > org.apache.pig.backend.hadoop.hbase.HBaseStorage('v:member v:guest') as
> > (member:chararray, guest:chararray);
> >
> > The pig script fails and the log is as below,
> > Backend error message
> > ---------------------
> > Error: java.lang.ClassNotFoundException:
> > org.apache.hadoop.hbase.mapreduce.TableInputFormat
> >         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> >         at java.security.AccessController.doPrivileged(Native Method)
> >         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> >         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> >         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> >         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> >         at java.lang.ClassLoader.defineClass1(Native Method)
> >         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> >         at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> >         at
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
> >         at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
> >         at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> >         at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> >         at java.security.AccessController.doPrivileged(Native Method)
> >         at java.net.URLClassLoader.findClass(URLClassLoader.java:190
> >
> > Backend error message
> > ---------------------
> > Error: java.lang.ClassNotFoundException:
> > org.apache.hadoop.hbase.mapreduce.TableInputFormat
> >         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> >         at java.security.AccessController.doPrivileged(Native Method)
> >         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)
> >         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> >         at java.lang.ClassLoader.defineClass1(Native Method)
> >         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
> >         at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
> >         at
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
> >         at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
> >         at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> >         at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> >         at java.security.AccessController.doPrivileged(Native Method)
> >         at java.net.URLClassLoader.findClass(URLClassLoader.java:190
> >
> > Error message from task (reduce) task_201303270642_0043_r_000000

*Note that I'm no longer using my Yahoo! email address. Please email me at
[EMAIL PROTECTED] going forward.*
+
Praveen Bysani 2013-03-28, 10:25
+
Bill Graham 2013-03-28, 14:48
+
Praveen Bysani 2013-04-01, 02:42
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB