hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: HBase Bulk Import Exception
Date Mon, 05 Dec 2011 19:02:01 GMT
Hey Shawn,

Run it as:

HADOOP_CLASSPATH=`hbase classpath` hadoop jar (…)

The guava supplied class is required on the frontend code as well, which is what it fails
to find and hence crashes out with a no-class-def. Doing the above should solve it for you.

On 03-Dec-2011, at 5:58 AM, Shawn O'Rourke wrote:

> Hello,
> 
> 
> 
> I am trying to do a bulk import of some data into a table (named TRANS)
> with the following syntax:
> 
> 
> 
> hadoop jar /usr/lib/hbase/hbase-0.90.1-CDH3B4.jar importtsv -libjars
> /usr/lib/hbase/lib/guava-r06.jar '-Dimporttsv.separator=,'
> -Dimporttsv.columns=CF1:TBC2,CF1:TBC1,HBASE_ROW_KEY TRANS
> /tmpdata/oneline.txt
> 
> 
> 
> I am getting the following exception:
> 
> 
> 
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/google/common/base/Function
> 
>        at
> org.apache.hadoop.hbase.mapreduce.ImportTsv.createSubmittableJob(ImportTsv.java:299)
> 
>        at
> org.apache.hadoop.hbase.mapreduce.ImportTsv.main(ImportTsv.java:370)
> 
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 
>        at java.lang.reflect.Method.invoke(Method.java:597)
> 
>        at
> org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
> 
>        at
> org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
> 
>        at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:49)
> 
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 
>        at java.lang.reflect.Method.invoke(Method.java:597)
> 
>        at org.apache.hadoop.util.RunJar.main(RunJar.java:186)
> 
> Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
> 
>        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)
> 
>        ... 14 more
> 
> 
> 
> I believe this function is in guava-r06.jar, but it seems that –libjars is
> not picking this up.  Am I using the wrong syntax?  I can provide
> additional info as needed.
> 
> 
> Thanks,
> Shawn O'Rourke


Mime
View raw message