我正在使用Hortonworks Sandbox 1.2,而且我對Hadoop平臺很新。Hadoop PIG Helper GROUP錯誤
所以這裏是錯誤,而我正在按照沙箱包含的教程。在PIG部分,我使用PIG Helper插入了GROUP代碼。它插入一個代碼,如
GROUP %VAR% BY %VAR%
而我的代碼看起來像這樣,我完成教程後。就像是在教程告訴
[main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: mismatched input ';' expecting LEFT_PAREN
我做的一切:
a = LOAD 'nyse_stocks' USING org.apache.hcatalog.pig.HCatLoader();
b = FILTER a BY stock_symbol == 'IBM';
c = GROUP b BY all;
d = FOREACH c GENERATE AVG(b.stock_volume);
DUMP d;
它提供了以下錯誤。那麼錯誤在哪裏?編輯: 我在下面添加了PIG日誌。
2013-06-24 04:56:16,869 [main] INFO org.apache.pig.Main - Apache Pig version 0.10.1.21 (rexported) compiled Dec 24 2012, 03:01:24
2013-06-24 04:56:16,870 [main] INFO org.apache.pig.Main - Logging error messages to: /hadoop/mapred/taskTracker/sandbox/jobcache/job_201306240450_0001/attempt_201306240450_0001_m_000000_0/work/pig_1372064176867.log
2013-06-24 04:56:20,224 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: hdfs://sandbox:8020
2013-06-24 04:56:22,862 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to map-reduce job tracker at: sandbox:50300
2013-06-24 04:56:25,672 [main] WARN org.apache.hadoop.hive.conf.HiveConf - DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
2013-06-24 04:56:25,959 [main] INFO hive.metastore - Trying to connect to metastore with URI thrift://sandbox:9083
2013-06-24 04:56:27,956 [main] INFO hive.metastore - Waiting 1 seconds before next connection attempt.
2013-06-24 04:56:28,957 [main] INFO hive.metastore - Connected to metastore.
2013-06-24 04:56:30,552 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: mismatched input ';' expecting LEFT_PAREN
Details at logfile: /hadoop/mapred/taskTracker/sandbox/jobcache/job_201306240450_0001/attempt_201306240450_0001_m_000000
你可以粘貼豬日誌嗎? – zsxwing
我添加了豬日誌。我通過改變GROUP epression來解決問題。剛剛刪除關鍵字,它的工作。 –