0

executing the following command -x local -f /Hbase/load_hbase.pig

I get the following error

2014-11-08 23:36:47,455 [main] INFO  org.apache.pig.Main - Apache Pig version 0.12.1 (r1585011) compiled Apr 05 2014, 01:41:34
2014-11-08 23:36:47,455 [main] INFO  org.apache.pig.Main - Logging error messages to: /home/eduardo/pig_1415497007452.log
2014-11-08 23:36:47,817 [main] INFO  org.apache.pig.impl.util.Utils - Default bootup file /home/eduardo/.pigbootup not found
2014-11-08 23:36:47,918 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: file:///
2014-11-08 23:36:48,436 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2998: Unhandled internal error. org/apache/hadoop/hbase/filter/WritableByteArrayComparable

Here is the code that I run:

raw_data = LOAD '/data/QCLCD201211/201201hourly.txt' USING PigStorage(',');
weather_data = FOREACH raw_data GENERATE $1, $10;
ranked_data = RANK weather_data;
final_data = FILTER ranked_data BY $0 IS NOT NULL;
STORE final_data INTO 'hbase://weather' 
         USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('info:date info:temp');

I wonder what I'm doing wrong I'll put down the version of hadoop, hbase and the pig. Hadoop: hadoop-1.2.1 Hbase: hbase-0.96.2-hadoop1 Pig: pig-0.12.1

Eduardo Asafe
  • 129
  • 2
  • 10

1 Answers1

0

copy pig jar and hbase jar in hadoop

1) COPY THESE FILES TO THE HADOOP LIBRARY.

sudo cp /usr/lib/pig/lib/pig-common-0.8.0-cdh3u0.jar  /usr/lib/hadoop/lib/
sudo cp /usr/lib/pig/lib/hbase-0.96.2-cdh3u0.jar  /usr/lib/hadoop/lib/
sudo cp /usr/lib/pig/lib/hbase-0.96.2-cdh3u0.jar  /usr/lib/hadoop/lib/

2)CLOSE HBASE AND HADOOP USING FOLLOWING COMMOND

/usr/lib/hadoop/bin/stop-all.sh
/usr/lib/hbase/bin/stop-hbase.sh

3) RESTART HBASE AND HADOOP USING COMMOND

 /usr/lib/hadoop/bin/start-all.sh
/usr/lib/hadoop/bin/start-hbase.sh
Kishore
  • 5,761
  • 5
  • 28
  • 53
  • I do not find these files on my pig / lib folder. Here I found a file called jython-standalone-2.5.3.jar and a folder called jdiff. – Eduardo Asafe Nov 09 '14 at 20:39