pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhang, Liyun" <liyun.zh...@intel.com>
Subject RE: use pig in eclipse
Date Wed, 31 Dec 2014 12:22:49 GMT
Hi 李运田:
  Following error is in your mail:
   java.lang.NoSuchFieldException: runnerState  at java.lang.Class.getDeclaredField(Class.java:1948)

Are you use hadoop 2 while compiling pig with hadooop 1?

How to compile pig with hadoop2:
ant -Dhadoopversion=23 jar

-----Original Message-----
From: 李运田 [mailto:cumtshu@163.com] 
Sent: Tuesday, December 30, 2014 5:39 PM
To: dev@pig.apache.org; user
Subject: use pig in eclipse

my eclipse and pig are in same linux. 
this is my pig configuration in  eclipse:
 props.setProperty("fs.defaultFS", "hdfs://");
     props.setProperty("hadoop.job.user", "hadoop");
     props.setProperty("mapreduce.framework.name", "yarn");
     props.setProperty("yarn.resourcemanager.hostname", "");
     props.setProperty("yarn.resourcemanager.admin.address", "");
        props.setProperty("yarn.resourcemanager.address", "");
     props.setProperty("yarn.resourcemanager.resource-tracker.address", "");
     props.setProperty("yarn.resourcemanager.scheduler.address", ""); I
have added core-site.xml、 yarn-site.xml、。。。。。into eclipse project.
I can run pig script in " grunt> "
but,when I run
pigServer = new PigServer( ExecType.MAPREDUCE, props);
   pigServer.registerQuery("tmp= LOAD '/user/hadoop/aa.txt';");
   pigServer.registerQuery("tmp_table_limit = order tmp by $0;");
   pigServer.store("tmp_table_limit", "/user/hadoop/shi.txt"); I always get error:
14/12/30 17:28:33 WARN hadoop20.PigJobControl: falling back to default JobControl (not using
hadoop 0.20 ?)
java.lang.NoSuchFieldException: runnerState  at java.lang.Class.getDeclaredField(Class.java:1948)
 at org.apache.pig.backend.hadoop20.PigJobControl.<clinit>(PigJobControl.java:51)
View raw message