0

I am trying to read hive table using PIG script but when I run a pig code to read a table in hive its giving me following error:

2014-02-12 15:48:36,143 [main] WARN org.apache.hadoop.hive.conf.HiveConf  
    -hive-site.xml not found on CLASSPATH 2014-02-12 15:49:10,781 [main] ERROR
    org.apache.pig.tools.grunt.Grunt - ERROR 2997:  Unable to recreate
    exception from backed error: Error: Found class 
    org.apache.hadoop.mapreduce.TaskAttemptContext, but interface was expected

(Ignore newlines and whitespace added for readability)

Hadoop version 1.1.1

Hive version 0.9.0

Pig version 0.10.0

    Pig code
    a = LOAD '/user/hive/warehouse/test' USING 
    org.apache.pig.piggybank.storage.HiveColumnarLoader('name string');

Is it due to some version mismatch ?

Henk Langeveld
  • 8,088
  • 1
  • 43
  • 57
Chhaya Vishwakarma
  • 1,407
  • 9
  • 44
  • 72

1 Answers1

1

Why can't you use hcatalog to access hive metadata in pig?
Check this for an example

croxy
  • 4,082
  • 9
  • 28
  • 46
hjamali52
  • 1,135
  • 5
  • 12
  • 19