Hi, I'm developing and debugging my pig script locally. Suddenly I've got
such exception.
The partial code is:
routePivotsGroupedByMsisdn = GROUP routePivots BY msisdn;
markedPivots = FOREACH routePivotsGroupedByMsisdn {
ordered = ORDER routePivots BY ts;
GENERATE FLATTEN(udf.filter_route_pivots(ordered))
as (msisdn: long, --0
ts: long, --1
lac: int, --2
cid: int, --3
lon, --4
lat, --5
azimuth, --6
hpbw, --7
max_dist, --8
cell_type: chararray, --9
branch_id, --10
center_lon: double, --11
center_lat: double, --12
tile_id: int, --13
zone_col: int, --14
zone_row: int, --15
is_active, --16
not_valid);
}
SPLIT markedPivots INTO corruptedPivots if not_valid is not null,
validPivots if not_valid is null;
groupedValidPivots = GROUP validPivots BY msisdn;
pivotsWithEndPoints = FOREACH groupedValidPivots {
ordered = ORDER validPivots BY ts;
GENERATE FLATTEN(udf.mark_end_points(validPivots))
as (msisdn: long, --0
ts: long, --1
lac: int, --2
cid: int, --3
lon, --4
lat, --5
azimuth, --6
hpbw, --7
max_dist, --8
cell_type: chararray, --9
branch_id, --10
center_lon: double, --11
center_lat: double, --12
tile_id: int, --13
zone_col: int, --14
zone_row: int, --15
is_active, --16
is_end_point: boolean,
end_point_type: chararray);
}
projPivotsWithEndPoints = FOREACH pivotsWithEndPoints GENERATE *msisdn*, ts,
center_lon,
center_lat,
lac, cid,
cell_type, is_active,
is_end_point, end_point_type;
STORE projPivotsWithEndPoints INTO '$validPivots' USING
org.apache.pig.piggybank.storage.avro.AvroStorage('index', '3', 'schema',
'{"name": "valid_pivots", "doc": "version 0.0.1", "type": "record",
"fields": [
{"name": "msisdn", "type": "long"},
{"name": "ts", "type": "long"},
{"name": "center_lon", "type": "double"},
{"name": "center_lat", "type": "double"},
{"name": "lac", "type": "int"},
{"name": "cid", "type": "int"},
{"name": "cell_type", "type": "string"},
{"name": "is_active", "type": "boolean"},
{"name": "is_end_point", "type": "boolean"},
{"name": "end_point_type","type": "string"}
]}');
It complains on marked field.
If I use default
STORE pivotsWithEndPoints INTO '$validPivots';
everything works fine.
What do I do wrong?