1
votes

Are there any way to read data from a file and put them into Hbase table without using any java? I tried to store data from pig script by using

sample = LOAD '/mapr/user/username/sample.txt' AS (all:chararray); STORE deneme INTO 'hbase://sampledata' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('mysampletable:intdata');

but this gave this error message:

ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2998: Unhandled internal error. org/apache/hadoop/hbase/filterWritableByteArrayComparable

ERROR org.apache.pig.tools.grunt.Grunt java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/filter/WritableByteArrayComparable

3

3 Answers

0
votes

Pig seems like a good idea to import data into HBase. Check what Armon suggested about setting the $PIG_CLASSPATH.

Another possibility to bulk loading data into HBase is to use featured tools like ImportTsv (Tab Separated Values) and CompleteBulkLoad.

http://hbase.apache.org/book/ops_mgt.html#importtsv

0
votes

Well, there's the Stargate REST interface, which is usable from any language. It's not perfect, but it's worth a look.

0
votes

You just need to make sure that $PIG_CLASSPATH also points at hbase.jar