You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Bharat Shetty <bh...@gmail.com> on 2013/11/03 04:58:48 UTC

Compile error when running map-reduce program for HBase Export

Hi,

I'm trying to export data from HBase table into HDFS using map-reduce in
the Text format. Note that I have already tried the export tool that comes
with HBase, which dumps data into the HDFS as bytes in a sequence file.
However, my use-case requires Text data to be dumped into the HDFS.

I'm running into compile time errors when I run my Java program.

bsb@naples:~javac -classpath $HBASE_CLASSPATH HBaseCsvExporter.java

HBaseCsvExporter.java:80: cannot find symbol
symbol  : variable Text
location: class HBaseCsvExporter
TableMapReduceUtil.initTableMapperJob(tableName, s, Exporter.class, Text,
Text, job);
                                                                    ^
HBaseCsvExporter.java:80: cannot find symbol

The error indicates that my Java program cannot find location of the "Text"
class. I tried including many jars that came in lib/ folder of the
HBase-0.96. Which jar I may be missing in the HBASE_CLASSPATH ? Note, that
I'm using HBase-0.96 with Hadoop-2.1.0-beta.

If someone could throw more light on how to solve this, it would help
greatly.

Regards,
Bharat Shetty Barkur

Re: Compile error when running map-reduce program for HBase Export

Posted by Ted Yu <yu...@gmail.com>.
The fourth parameter should be of type Class. 

On Nov 2, 2013, at 8:58 PM, Bharat Shetty <bh...@gmail.com> wrote:

> Hi,
> 
> I'm trying to export data from HBase table into HDFS using map-reduce in
> the Text format. Note that I have already tried the export tool that comes
> with HBase, which dumps data into the HDFS as bytes in a sequence file.
> However, my use-case requires Text data to be dumped into the HDFS.
> 
> I'm running into compile time errors when I run my Java program.
> 
> bsb@naples:~javac -classpath $HBASE_CLASSPATH HBaseCsvExporter.java
> 
> HBaseCsvExporter.java:80: cannot find symbol
> symbol  : variable Text
> location: class HBaseCsvExporter
> TableMapReduceUtil.initTableMapperJob(tableName, s, Exporter.class, Text,
> Text, job);
>                                                                    ^
> HBaseCsvExporter.java:80: cannot find symbol
> 
> The error indicates that my Java program cannot find location of the "Text"
> class. I tried including many jars that came in lib/ folder of the
> HBase-0.96. Which jar I may be missing in the HBASE_CLASSPATH ? Note, that
> I'm using HBase-0.96 with Hadoop-2.1.0-beta.
> 
> If someone could throw more light on how to solve this, it would help
> greatly.
> 
> Regards,
> Bharat Shetty Barkur