這是爲我工作..
((1,{(1,2),(1,3),(1,4)}))
((2,{(2,5),(2,6),(2,7)}))
grunt> X = LOAD '/Q3.txt' as (a:tuple(a1: int, b1: bag{}));
Input(s):
Successfully read 2 records (411 bytes) from: "/Q3.txt"
Output(s):
Successfully stored 2 records (59 bytes) in: "hdfs://localhost:9000/tmp/temp-2096988480/tmp-1540654064"
C
這裏是輸出:
2015-09-19 23:16:37,440 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Success!
2015-09-19 23:16:37,443 [main] INFO org.apache.pig.data.SchemaTupleBackend - Key [pig.schematuple] was not set... will not generate code.
2015-09-19 23:16:37,448 [main] INFO org.apache.hadoop.mapreduce.lib.input.FileInputFormat - Total input paths to process : 1
2015-09-19 23:16:37,448 [main] INFO org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths to process : 1
((1,{(1,2),(1,3),(1,4)}))
((2,{(2,5),(2,6),(2,7)}))