Package com.asakusafw.compiler.flow.stage

Examples of com.asakusafw.compiler.flow.stage.ShuffleModel


     * @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);
            }
View Full Code Here


     * @param block ステージブロック
     * @return シャッフルの構造、シャッフルしない場合は{@code null}
     * @throws IOException 出力に失敗した場合
     */
    protected ShuffleModel compileShuffle(StageBlock block) throws IOException {
        ShuffleModel shuffle = new ShuffleAnalyzer(environment).analyze(block);
        assertThat(environment.hasError(), is(false));
        if (shuffle == null) {
            return null;
        }
        Name keyTypeName = new ShuffleKeyEmitter(environment).emit(shuffle);
        Name valueTypeName = new ShuffleValueEmitter(environment).emit(shuffle);
        Name groupComparatorTypeName = new ShuffleGroupingComparatorEmitter(environment).emit(shuffle, keyTypeName);
        Name sortComparatorTypeName = new ShuffleSortComparatorEmitter(environment).emit(shuffle, keyTypeName);
        Name partitionerTypeName = new ShufflePartitionerEmitter(environment).emit(shuffle, keyTypeName, valueTypeName);
        CompiledShuffle compiled = new CompiledShuffle(
                keyTypeName,
                valueTypeName,
                groupComparatorTypeName,
                sortComparatorTypeName,
                partitionerTypeName);
        shuffle.setCompiled(compiled);
        return shuffle;
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.flow.stage.ShuffleModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.