Hi,
I'm facing the issue after the Load. Following the example code I get the following error. I also removed the phonenumber and just kept
person.name, the map reduce starts but it does not map to any fields in the data. I've added the log after the following block. Also attached the data i'm using.
grunt>raw = LOAD 'AddressBook.data' USING com.twitter.elephantbird.pig.load.ProtobufPigLoader('com.twitter.elephantbird.examples.proto.AddressBookProtos.AddressBook');
grunt> person_phone_numbers = foreach raw generate name, FLATTEN(phone.phone_tuple.number) as phone_number;
2013-06-07 12:32:51,881 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1128: Cannot find field phone_tuple in name:chararray,id:int,email:chararray,phone:bag{phone_tuple:tuple(number:chararray,type:chararray)}
2013-06-07 12:32:51,881 [main] WARN org.apache.pig.tools.grunt.Grunt - There is no log file to write to.
2013-06-07 12:32:51,881 [main] ERROR org.apache.pig.tools.grunt.Grunt - Failed to parse: Pig script failed to parse:
<line 22, column 23> pig script failed to validate: org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1128: Cannot find field phone_tuple in name:chararray,id:int,email:chararray,phone:bag{phone_tuple:tuple(number:chararray,type:chararray)}
at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:191)
grunt> person_phone_numbers = foreach raw generate
person.name;
dump person_phone_numbers
2013-06-07 12:34:36,338 [main] INFO org.apache.pig.tools.pigstats.ScriptState - Pig features used in the script: UNKNOWN
2013-06-07 12:34:36,342 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler - File concatenation threshold: 100 optimistic? false
2013-06-07 12:34:36,343 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size before optimization: 1
2013-06-07 12:34:36,343 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size after optimization: 1
2013-06-07 12:34:36,344 [main] INFO org.apache.pig.tools.pigstats.ScriptState - Pig script settings are added to the job
2013-06-07 12:34:36,344 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - mapred.job.reduce.markreset.buffer.percent is not set, set to default 0.3
2013-06-07 12:34:36,344 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Using reducer estimator: org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator
2013-06-07 12:34:36,347 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator - BytesPerReducer=1000000000 maxReducers=999 totalInputFileSize=81
2013-06-07 12:34:36,347 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Setting Parallelism to 1
2013-06-07 12:34:36,573 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - creating jar file Job5349291827032820997.jar
2013-06-07 12:34:39,371 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - jar file Job5349291827032820997.jar created
2013-06-07 12:34:39,378 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Setting up single store job
2013-06-07 12:34:39,379 [main] INFO org.apache.pig.data.SchemaTupleFrontend - Key [pig.schematuple] is false, will not generate code.
2013-06-07 12:34:39,379 [main] INFO org.apache.pig.data.SchemaTupleFrontend - Starting process to move generated code to distributed cacche
2013-06-07 12:34:39,379 [main] INFO org.apache.pig.data.SchemaTupleFrontend - Setting key [pig.schematuple.classes] with classes to deserialize []
2013-06-07 12:34:39,388 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 1 map-reduce job(s) waiting for submission.
2013-06-07 12:34:39,405 [JobControl] WARN org.apache.hadoop.mapred.JobClient - Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
2013-06-07 12:34:39,632 [JobControl] INFO org.apache.hadoop.mapreduce.lib.input.FileInputFormat - Total input paths to process : 1
2013-06-07 12:34:39,632 [JobControl] INFO org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths (combined) to process : 0
2013-06-07 12:34:39,889 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 0% complete
2013-06-07 12:34:40,419 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - HadoopJobId: job_201306062036_0012
2013-06-07 12:34:40,419 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Processing aliases person_phone_numbers,raw
2013-06-07 12:34:40,419 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - detailed locations: M: raw[21,6],person_phone_numbers[22,23] C: R:
2013-06-07 12:34:49,996 [main] WARN mapreduce.Counters - Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead
2013-06-07 12:34:49,998 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 100% complete
2013-06-07 12:34:49,999 [main] INFO org.apache.pig.tools.pigstats.SimplePigStats - Script Statistics:
HadoopVersion PigVersion UserId StartedAt FinishedAt Features
2.0.0-cdh4.3.0 0.11.0-cdh4.3.0 hduser 2013-06-07 12:34:36 2013-06-07 12:34:49 UNKNOWN
Success!
Job Stats (time in seconds):
JobId Maps Reduces MaxMapTime MinMapTIme AvgMapTime MedianMapTime MaxReduceTime MinReduceTime AvgReduceTime MedianReducetime Alias Feature Outputs
job_201306062036_0012 0 0 0 0 0 0 0 0 0 0 person_phone_numbers,raw MAP_ONLYhdfs://localhost:8020/tmp/temp976511903/tmp-690803741,
Input(s):
Successfully read 0 records from: "hdfs://localhost:8020/user/hduser/input/AddressBook.data"
Output(s):
Successfully stored 0 records in: "hdfs://localhost:8020/tmp/temp976511903/tmp-690803741"
Counters:
Total records written : 0
Total bytes written : 0
Spillable Memory Manager spill count : 0
Total bags proactively spilled: 0
Total records proactively spilled: 0
Job DAG:
job_201306062036_0012
2013-06-07 12:34:50,016 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Success!
2013-06-07 12:34:50,017 [main] INFO org.apache.pig.data.SchemaTupleBackend - Key [pig.schematuple] was not set... will not generate code.
2013-06-07 12:34:50,029 [main] INFO org.apache.hadoop.mapreduce.lib.input.FileInputFormat - Total input paths to process : 0
2013-06-07 12:34:50,029 [main] INFO org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths to process : 0