Examples of defineVariables()


Examples of com.asakusafw.runtime.util.VariableTable.defineVariables()

            Precondition.checkMustNotBeNull(executionId, "executionId"); //$NON-NLS-1$
            Precondition.checkMustNotBeNull(variables, "variables"); //$NON-NLS-1$
            this.homePathPrefix = homePathPrefix;
            this.executionId = executionId;
            VariableTable table = new VariableTable();
            table.defineVariables(variables);
            this.variableList = table.toSerialString();
        }

        /**
         * コマンドホームディレクトリの接頭辞を返す。
 
View Full Code Here

Examples of com.asakusafw.runtime.util.VariableTable.defineVariables()

    }

    Map<String, String> getHadoopProperties() {
        TestDriverContext context = configuration.context;
        VariableTable resolver = new VariableTable(RedefineStrategy.ERROR);
        resolver.defineVariables(context.getBatchArgs());
        Map<String, String> dPropMap = Maps.create();
        dPropMap.put(StageConstants.PROP_USER, context.getOsUser());
        dPropMap.put(StageConstants.PROP_EXECUTION_ID, context.getExecutionId());
        dPropMap.put(StageConstants.PROP_ASAKUSA_BATCH_ARGS, resolver.toSerialString());
        dPropMap.putAll(context.getExtraConfigurations());
View Full Code Here

Examples of com.asakusafw.runtime.util.VariableTable.defineVariables()

    }

    private VariableTable createVariables(TestContext context) {
        assert context != null;
        VariableTable result = new VariableTable();
        result.defineVariables(context.getArguments());
        return result;
    }

    private <V> void checkType(DataModelDefinition<V> definition,
            TemporaryInputDescription description) throws IOException {
View Full Code Here

Examples of com.asakusafw.runtime.util.VariableTable.defineVariables()

    }

    private VariableTable createVariables(TestContext context) {
        assert context != null;
        VariableTable result = new VariableTable();
        result.defineVariables(context.getArguments());
        return result;
    }

    private <V> void checkType(DataModelDefinition<V> definition,
            TemporaryOutputDescription description) throws IOException {
View Full Code Here

Examples of com.asakusafw.runtime.util.VariableTable.defineVariables()

        if (arguments == null) {
            LOG.warn(MessageFormat.format(
                    "A mandatory property \"{0}\" does not defined",
                    PROP_ASAKUSA_BATCH_ARGS));
        } else {
            variables.defineVariables(arguments);
        }
        return variables;
    }
}
View Full Code Here

Examples of com.asakusafw.runtime.util.VariableTable.defineVariables()

                        context.getTaskAttemptID()));
            }
            DirectDataSourceRepository repository = HadoopDataSourceUtil.loadRepository(context.getConfiguration());
            String arguments = context.getConfiguration().get(StageConstants.PROP_ASAKUSA_BATCH_ARGS, "");
            VariableTable variables = new VariableTable(VariableTable.RedefineStrategy.IGNORE);
            variables.defineVariables(arguments);

            String path = variables.parse(rawBasePath, false);
            String id = repository.getRelatedId(path);
            OutputAttemptContext outputContext = HadoopDataSourceUtil.createContext(context, id);
            DataFormat<? super T> format = ReflectionUtils.newInstance(dataFormatClass, context.getConfiguration());
View Full Code Here

Examples of com.asakusafw.runtime.util.VariableTable.defineVariables()

        if (arguments == null) {
            LOG.warn(MessageFormat.format(
                    "Missing configuration \"{0}\" (batch arguments)",
                    PROP_ASAKUSA_BATCH_ARGS));
        } else {
            variables.defineVariables(arguments);
        }

        // replace variables
        configuration.set(PROP_ASAKUSA_BATCH_ARGS, variables.toSerialString());
        return variables;
View Full Code Here

Examples of com.asakusafw.runtime.util.VariableTable.defineVariables()

        assert context != null;
        assert repo != null;
        assert inputList != null;
        String arguments = context.getConfiguration().get(StageConstants.PROP_ASAKUSA_BATCH_ARGS, "");
        VariableTable variables = new VariableTable(VariableTable.RedefineStrategy.IGNORE);
        variables.defineVariables(arguments);

        Map<DirectInputGroup, List<InputPath>> results = new HashMap<DirectInputGroup, List<InputPath>>();
        for (StageInput input : inputList) {
            String fullBasePath = variables.parse(extractBasePath(input));
            String basePath = repo.getComponentPath(fullBasePath);
View Full Code Here

Examples of com.asakusafw.runtime.util.VariableTable.defineVariables()

    static VariableTable getVariableTable(JobContext context) {
        assert context != null;
        String arguments = context.getConfiguration().get(StageConstants.PROP_ASAKUSA_BATCH_ARGS, "");
        VariableTable variables = new VariableTable(VariableTable.RedefineStrategy.IGNORE);
        variables.defineVariables(arguments);
        return variables;
    }

    private static final class OutputSpec {
View Full Code Here

Examples of com.asakusafw.runtime.util.VariableTable.defineVariables()

        @Override
        public void setup(ResourceConfiguration configuration) throws IOException, InterruptedException {
            String arguments = configuration.get(StageConstants.PROP_ASAKUSA_BATCH_ARGS, "");
            VariableTable variables = new VariableTable(VariableTable.RedefineStrategy.IGNORE);
            variables.defineVariables(arguments);
            BatchContext context = new BatchContext(variables.getVariables());
            CONTEXTS.set(context);
        }

        @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.