Package com.asakusafw.vocabulary.windgate

Examples of com.asakusafw.vocabulary.windgate.WindGateExporterDescription


                        e.getMessage());
                valid = false;
            }
        }
        for (OutputDescription output : outputs) {
            WindGateExporterDescription desc = extract(output);
            try {
                validateCommonProperties(desc);
                if (desc.getDriverScript() == null) {
                    throw new IllegalStateException(MessageFormat.format(
                            "Driver script is not defined: {0}",
                            desc.getClass().getName()));
                }
            } catch (IllegalStateException e) {
                getEnvironment().error(
                        "Exporter description \"{0}\" is invalid (batch={1}, flow={2}): {3}",
                        output.getName(),
View Full Code Here


                drain);
    }

    private ProcessScript<?> toProcessScript(Output output) {
        assert output != null;
        WindGateExporterDescription desc = extract(output.getDescription());
        String location = getOutputLocation(output.getDescription()).toPath('/');
        DriverScript source = new DriverScript(
                Constants.HADOOP_FILE_RESOURCE_NAME,
                Collections.singletonMap(FileProcess.FILE.key(), location));
        return createProcessScript(
                output.getDescription().getName(),
                desc.getModelType(),
                source,
                desc.getDriverScript());
    }
View Full Code Here

            WindGateImporterDescription desc = extract(input.getDescription());
            add(importers, desc.getProfileName(), input);
        }
        Map<String, IoContextBuilder> exporters = Maps.create();
        for (Output output : context.getOutputs()) {
            WindGateExporterDescription desc = extract(output.getDescription());
            add(exporters, desc.getProfileName(), output);
        }
        return new CommandProvider(
                getEnvironment().getBatchId(),
                getEnvironment().getFlowId(),
                build(importers),
View Full Code Here

            ResourceManipulator manipulator =
                WindGateTestHelper.createResourceManipulator(context, description, parameterList);
            SourceDriver<T> driver = manipulator.createSourceForSource(process);
            return new WindGateSource<T>(WindGateTestHelper.prepare(driver), definition);
        } else if (instance instanceof WindGateExporterDescription) {
            WindGateExporterDescription description = (WindGateExporterDescription) instance;
            ProcessScript<T> process = WindGateTestHelper.createProcessScript(
                    definition.getModelClass(),
                    description);
            ParameterList parameterList = new ParameterList(context.getArguments());
            ResourceManipulator manipulator =
View Full Code Here

        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateExporterDescription description = new MockExporterDescription(
                String.class,
                "testing",
                driver);
        WindGateExporterRetriever preparator = new WindGateExporterRetriever();
View Full Code Here

        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateExporterDescription description = new MockExporterDescription(
                String.class,
                "testing",
                driver);
        WindGateExporterRetriever retriever = new WindGateExporterRetriever();
        ModelOutput<String> output = retriever.createOutput(ValueDefinition.of(String.class), description, EMPTY);
View Full Code Here

        }

        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateExporterDescription description = new MockExporterDescription(
                String.class,
                "testing",
                driver);
        WindGateExporterRetriever retriever = new WindGateExporterRetriever();
        ValueDefinition<String> stringDef = ValueDefinition.of(String.class);
View Full Code Here

    public void createExporterProcessScript() throws Exception {
        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateExporterDescription description = new MockExporterDescription(String.class, "dummy", driver);
        ProcessScript<String> script = WindGateTestHelper.createProcessScript(String.class, description);

        assertThat(script.getDataClass(), equalTo(String.class));
        assertThat(script.getDrainScript().getResourceName(), is("file"));
        assertThat(script.getDrainScript().getConfiguration(), is(driver.getConfiguration()));
View Full Code Here

TOP

Related Classes of com.asakusafw.vocabulary.windgate.WindGateExporterDescription

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.