/** * ステージブロックを解析して断片までの解析が終わったステージの構造を返す。 * * @param block ステージブロック * @return 断片までの解析が終わったステージの構造 * @throws IOException 出力に失敗した場合 */ protected StageModel compileFragments(StageBlock block) throws IOException { ShuffleModel shuffle = compileShuffle(block); StageModel stage = new StageAnalyzer(environment).analyze(block, shuffle); for (MapUnit unit : stage.getMapUnits()) { for (Fragment fragment : unit.getFragments()) { compile(fragment, stage); } } for (ReduceUnit unit : stage.getReduceUnits()) { for (Fragment fragment : unit.getFragments()) { compile(fragment, stage); } } return stage; }