豚のスクリプトで次の行を使用しています。
set default_parallel 20;
requests = LOAD ‘/user/me/todayslogs.gz’ USING customParser;
intermediate_results = < some-processing ... >
some_data = FOREACH intermediate_results GENERATE day, request_id, result;
STORE some_data INTO '/user/me/output_data' USING PigStorage(',');
「/user/me/todayslogs.gz」には、それぞれのサイズが 200 MB の数千の gzip ファイルが含まれています。
スクリプトが完了すると、「/user/me/output_data」には HDFS に数千の小さな (<1 KB ) ファイルが含まれます。
さらに処理するために、別の pig スクリプトで「/user/me/output_data」内のファイルを読み取る必要があります。その場合、パフォーマンスが低下することがわかります。some_data によって出力されたファイルが gzip されていると、パフォーマンスが低下します。
MapReduceLauncher からの出力は次のとおりです。
2013-11-04 12:38:11,961 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Processing aliases campaign_join,detailed_data,detailed_requests,fields_to_retain,grouped_by_reqid,impressions_and_clicks,minimal_data,ids_cleaned,request_id,requests,requests_only,requests_typed,xids_from_request
2013-11-04 12:38:11,961 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - detailed locations: M: requests[30,11],campaign_join[35,16],null[-1,-1],null[-1,-1],detailed_requests[37,20],detailed_data[39,16],null[-1,-1],minimal_data[49,15],null[-1,-1],ids_cleaned[62,18],grouped_by_reqid[65,21] C: R: null[-1,-1],xids_from_request[66,21],impressions_and_clicks[69,26],fields_to_retain[70,20],requests_only[67,17],request_id[68,18],requests_typed[73,17]
PigStorage に出力をより少ない出力ファイルに書き込むように強制するにはどうすればよいですか?