Package com.asakusafw.compiler.flow

Examples of com.asakusafw.compiler.flow.FlowCompilerOptions


    }

    @Override
    public boolean rewrite(FlowGraph graph) throws RewriteException {
        Precondition.checkMustNotBeNull(graph, "graph"); //$NON-NLS-1$
        FlowCompilerOptions options = getEnvironment().getOptions();
        if (options.isHashJoinForSmall() == false && options.isHashJoinForTiny() == false) {
            LOG.debug("Joinの最適化は行われません");
            return false;
        }
        return rewriteGraph(graph);
    }
View Full Code Here


    private boolean isSupportedSize(InputDescription desc) {
        assert desc != null;
        ImporterDescription importer = desc.getImporterDescription();
        assert importer != null;
        FlowCompilerOptions options = getEnvironment().getOptions();
        switch (importer.getDataSize()) {
            case TINY:
                return options.isHashJoinForTiny();
            case SMALL:
                // TODO implement for small
                // return options.isHashJoinForSmall();
                return false;
            default:
View Full Code Here

        this.frameworkDeployer = new FrameworkDeployer(createFramework);
        this.flow = new FlowDescriptionDriver();
        this.testClass = getClass();
        this.testName = "unknown";
        this.variables = new VariableTable(RedefineStrategy.ERROR);
        this.options = new FlowCompilerOptions();
        this.libraries = new ArrayList<File>();
    }
View Full Code Here

     *
     * @param level
     *            0: 設定可能な最適化を全て行わない、1: デフォルト、2~: 最適化を積極的に行う
     */
    public void setOptimize(int level) {
        FlowCompilerOptions options = driverContext.getOptions();
        if (level <= 0) {
            options.setCompressConcurrentStage(false);
            options.setCompressFlowPart(false);
            options.setHashJoinForSmall(false);
            options.setHashJoinForTiny(false);
            options.setEnableCombiner(false);
        } else if (level == 1) {
            options.setCompressConcurrentStage(FlowCompilerOptions.Item.compressConcurrentStage.defaultValue);
            options.setCompressFlowPart(FlowCompilerOptions.Item.compressFlowPart.defaultValue);
            options.setHashJoinForSmall(FlowCompilerOptions.Item.hashJoinForSmall.defaultValue);
            options.setHashJoinForTiny(FlowCompilerOptions.Item.hashJoinForTiny.defaultValue);
            options.setEnableCombiner(FlowCompilerOptions.Item.enableCombiner.defaultValue);
        } else {
            options.setCompressConcurrentStage(true);
            options.setCompressFlowPart(true);
            options.setHashJoinForSmall(true);
            options.setHashJoinForTiny(true);
            options.setEnableCombiner(true);
        }
    }
View Full Code Here

                Location.fromPath("testing", '/'),
                output,
                folder.newFolder("working"),
                Collections.<File>emptyList(),
                getClass().getClassLoader(),
                new FlowCompilerOptions());
        File script = YaessWorkflowProcessor.getScriptOutput(output);
        assertThat(script.isFile(), is(true));
        FileInputStream in = new FileInputStream(script);
        try {
            Properties result = new Properties();
View Full Code Here

    public StagePlannerTest(GenericOptionValue opt) {
        this.opt = opt;
    }

    private StagePlanner getPlanner() {
        FlowCompilerOptions options = new FlowCompilerOptions();
        options.setCompressConcurrentStage(false);
        options.setCompressFlowPart(false);
        options.setEnableCombiner(false);
        options.setEnableDebugLogging(true);
        options.setHashJoinForSmall(false);
        options.setHashJoinForTiny(false);
        options.putExtraAttribute(StagePlanner.KEY_COMPRESS_FLOW_BLOCK_GROUP, opt.getSymbol());
        return new StagePlanner(
                Collections.<FlowGraphRewriter>emptyList(),
                options);
        }
View Full Code Here

        gen.defineInput("in");
        gen.defineFlowPart("fp1", fp1.toGraph());
        gen.defineOutput("out");
        gen.connect("in", "fp1").connect("fp1", "out");

        FlowCompilerOptions options = new FlowCompilerOptions();
        options.setCompressFlowPart(true);
        StagePlanner planner = new StagePlanner(
                Collections.<FlowGraphRewriter>emptyList(),
                options);
        StageGraph stages = planner.plan(gen.toGraph());
View Full Code Here

        Collection<? extends TraceSetting> settings = extractTraceSettings();
        return rewrite(graph, settings);
    }

    private Collection<? extends TraceSetting> extractTraceSettings() throws RewriteException {
        FlowCompilerOptions options = getEnvironment().getOptions();
        String attribute = options.getExtraAttribute(KEY_COMPILER_OPTION);
        if (attribute == null) {
            return Collections.emptyList();
        }
        Collection<? extends TraceSetting> loaded;
        try {
            loaded = TraceSettingSerializer.deserialize(attribute);
        } catch (RuntimeException e) {
            String keyName = options.getExtraAttributeKeyName(KEY_COMPILER_OPTION);
            throw new RewriteException(MessageFormat.format(
                    Messages.getString("TracepointWeaveRewriter.errorExtractTracepoints"), //$NON-NLS-1$
                    keyName), e);
        }
        return normalize(loaded);
View Full Code Here

        this.callerClass = contextClass;
        this.repository = new TestToolRepository(contextClass.getClassLoader());
        this.extraConfigurations = new TreeMap<String, String>();
        this.batchArgs = new TreeMap<String, String>();
        this.environmentVariables = new HashMap<String, String>(System.getenv());
        this.options = new FlowCompilerOptions();
        configureOptions();
        this.skipPhases = EnumSet.noneOf(TestExecutionPhase.class);
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.flow.FlowCompilerOptions

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.