here is how I run things locally: java -cp /path/to/pig.jar:/path/to/conf org.apache.pig.Main -x local -f file.pig
and re: the error you spoke about above...I'm not sure what the error is? if you do pig -x local you're going to go into the local command line (grunt), where you can then run things locally. 2011/1/30 hiba houimli <[email protected]> > > Hi, > > when I do this : pig -x local > the result is : > 2011-01-30 23:30:45,311 [main] INFO org.apache.pig.Main - Logging error > messages to: /home/hiba/pig_1296426645308.log > 2011-01-30 23:30:46,087 [main] INFO > org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting > to hadoop file system at: file:/// > I can't find th error > > and I like to know the steps of running a pig script: > > content = load ’/home/hiba/tpch/lineitem.tbl’ using PigStorage(’|’) as > (orderkey, partkey, suppkey, linenumber, quantity:int, > extendedprice:double, discount:double, tax, returnflag, linestatus, > shipdate); > filtered = filter content by PIG_PATH.CompareDate(shipdate, ’1995-01-12’, > ’yyyy-MM-dd’, ’<=’); > groups = group content by (returnflag, linestatus); > records = foreach groups generate flatten(group), AVG(content.quantity), > AVG(content.extendedprice), AVG(content.discount), > COUNT(content); > --out = order records by group::returnflag, group::linestatus; > --store out into ’OUTPUT_PATH/tpch_query1’; > store records into ’OUTPUT_PATH/tpch_query1’; > > > and thank you >
