You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Alex <sa...@yahoo.com> on 2010/02/11 02:51:45 UTC

TableMapper ClassNotFound

Playing with HBase and Hadoop.
Trying to run a map job which dumps a content of my HBase table called "myTable" into HDFS directory called "output".

In my shell I type:

export HADOOP_CLASSPATH=/development/commons/commons-cli-1.1.jar:/development/hbase-0.20.1/lib/commons-logging-1.0.4.jar:/development/hbase-0.20.1/lib/commons-logging-api-1.0.4.jar:/development/hbase-0.20.1/hbase-0.20.1.jar:/development/hbase-0.20.1/lib/log4j-1.2.15.jar:/development/hbase-0.20.1/lib/zookeeper-3.2.1.jar:/development/XHadoop.jar

./bin/hadoop jobs.Runner myTable output

It complains about missing TableMapper class, but at the same time seems to be able to find TableInputFormatBase class, which is in the same jar as TableMapper (hbase-0.20.1.jar) included in HADOOP_CLASSPATH.

Any ideas what I am missing ?
Stack trace below.

Thanks !

Alex

10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/usr/local/hadoop/bin/../lib/native/Mac_OS_X-x86_64-64
10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/var/folders/jN/jN5B0qOMFge0ihhDMw5RmE+++TI/-Tmp-/
10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:os.name=Mac OS X
10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:os.arch=x86_64
10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:os.version=10.5.8
10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:user.name=alex
10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:user.home=/Users/alex
10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:user.dir=/development/hadoop-0.20.1/bin
10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=60000 watcher=org.apache.hadoop.hbase.client.HConnectionManager$ClientZKWatcher@4ab122a1
10/02/10 17:31:55 INFO zookeeper.ClientCnxn: zookeeper.disableAutoWatchReset is false
10/02/10 17:31:55 INFO zookeeper.ClientCnxn: Attempting connection to server localhost/fe80:0:0:0:0:0:0:1%1:2181
10/02/10 17:31:55 INFO zookeeper.ClientCnxn: Priming connection to java.nio.channels.SocketChannel[connected local=/fe80:0:0:0:0:0:0:1%1:59813 remote=localhost/fe80:0:0:0:0:0:0:1%1:2181]
10/02/10 17:31:55 INFO zookeeper.ClientCnxn: Server connection successful
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 0->192.168.20.101:,131439
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 1->192.168.20.101:131439,181538
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 2->192.168.20.101:181538,21662
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 3->192.168.20.101:21662,270916
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 4->192.168.20.101:270916,34817
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 5->192.168.20.101:34817,412780
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 6->192.168.20.101:412780,469094
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 7->192.168.20.101:469094,534187
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 8->192.168.20.101:534187,57842
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 9->192.168.20.101:57842,61544
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 10->192.168.20.101:61544,662822
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 11->192.168.20.101:662822,71142
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 12->192.168.20.101:71142,743856
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 13->192.168.20.101:743856,773531
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 14->192.168.20.101:773531,811447
10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 15->192.168.20.101:811447,
10/02/10 17:31:55 INFO mapred.JobClient: Running job: job_201002101632_0006
10/02/10 17:31:56 INFO mapred.JobClient:  map 0% reduce 0%
10/02/10 17:32:09 INFO mapred.JobClient: Task Id : attempt_201002101632_0006_m_000000_0, Status : FAILED
Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.mapreduce.TableMapper
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

Re: TableMapper ClassNotFound

Posted by Stack <st...@duboce.net>.
Please see this note:
http://hadoop.apache.org/hbase/docs/r0.20.3/api/org/apache/hadoop/hbase/mapreduce/package-summary.html#classpath

Below you are setting the CLASSPATH in launching shell but it may not
be set for the context the task is running in.

St.Ack

On Wed, Feb 10, 2010 at 5:51 PM, Alex <sa...@yahoo.com> wrote:
> Playing with HBase and Hadoop.
> Trying to run a map job which dumps a content of my HBase table called "myTable" into HDFS directory called "output".
>
> In my shell I type:
>
> export HADOOP_CLASSPATH=/development/commons/commons-cli-1.1.jar:/development/hbase-0.20.1/lib/commons-logging-1.0.4.jar:/development/hbase-0.20.1/lib/commons-logging-api-1.0.4.jar:/development/hbase-0.20.1/hbase-0.20.1.jar:/development/hbase-0.20.1/lib/log4j-1.2.15.jar:/development/hbase-0.20.1/lib/zookeeper-3.2.1.jar:/development/XHadoop.jar
>
> ./bin/hadoop jobs.Runner myTable output
>
> It complains about missing TableMapper class, but at the same time seems to be able to find TableInputFormatBase class, which is in the same jar as TableMapper (hbase-0.20.1.jar) included in HADOOP_CLASSPATH.
>
> Any ideas what I am missing ?
> Stack trace below.
>
> Thanks !
>
> Alex
>
> 10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/usr/local/hadoop/bin/../lib/native/Mac_OS_X-x86_64-64
> 10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/var/folders/jN/jN5B0qOMFge0ihhDMw5RmE+++TI/-Tmp-/
> 10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
> 10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:os.name=Mac OS X
> 10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:os.arch=x86_64
> 10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:os.version=10.5.8
> 10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:user.name=alex
> 10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:user.home=/Users/alex
> 10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Client environment:user.dir=/development/hadoop-0.20.1/bin
> 10/02/10 17:31:55 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=60000 watcher=org.apache.hadoop.hbase.client.HConnectionManager$ClientZKWatcher@4ab122a1
> 10/02/10 17:31:55 INFO zookeeper.ClientCnxn: zookeeper.disableAutoWatchReset is false
> 10/02/10 17:31:55 INFO zookeeper.ClientCnxn: Attempting connection to server localhost/fe80:0:0:0:0:0:0:1%1:2181
> 10/02/10 17:31:55 INFO zookeeper.ClientCnxn: Priming connection to java.nio.channels.SocketChannel[connected local=/fe80:0:0:0:0:0:0:1%1:59813 remote=localhost/fe80:0:0:0:0:0:0:1%1:2181]
> 10/02/10 17:31:55 INFO zookeeper.ClientCnxn: Server connection successful
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 0->192.168.20.101:,131439
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 1->192.168.20.101:131439,181538
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 2->192.168.20.101:181538,21662
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 3->192.168.20.101:21662,270916
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 4->192.168.20.101:270916,34817
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 5->192.168.20.101:34817,412780
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 6->192.168.20.101:412780,469094
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 7->192.168.20.101:469094,534187
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 8->192.168.20.101:534187,57842
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 9->192.168.20.101:57842,61544
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 10->192.168.20.101:61544,662822
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 11->192.168.20.101:662822,71142
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 12->192.168.20.101:71142,743856
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 13->192.168.20.101:743856,773531
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 14->192.168.20.101:773531,811447
> 10/02/10 17:31:55 INFO mapreduce.TableInputFormatBase: split: 15->192.168.20.101:811447,
> 10/02/10 17:31:55 INFO mapred.JobClient: Running job: job_201002101632_0006
> 10/02/10 17:31:56 INFO mapred.JobClient:  map 0% reduce 0%
> 10/02/10 17:32:09 INFO mapred.JobClient: Task Id : attempt_201002101632_0006_m_000000_0, Status : FAILED
> Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.mapreduce.TableMapper
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>