Package org.apache.ivory.oozie.coordinator

Examples of org.apache.ivory.oozie.coordinator.DATASETS


        // inputs
        if (process.getInputs() != null) {           
            for (Input input : process.getInputs().getInputs()) {
                if(!input.isOptional()) {
                    if (coord.getDatasets() == null)
                        coord.setDatasets(new DATASETS());
                    if (coord.getInputEvents() == null)
                        coord.setInputEvents(new INPUTEVENTS());

                    SYNCDATASET syncdataset = createDataSet(input.getFeed(), cluster, input.getName(), LocationType.DATA);
                    coord.getDatasets().getDatasetOrAsyncDataset().add(syncdataset);
   
                    DATAIN datain = createDataIn(input);
                    coord.getInputEvents().getDataIn().add(datain);
                }

                String inputExpr = getELExpression("dataIn('" + input.getName() + "', '" + input.getPartition() + "')");
                props.put(input.getName(), inputExpr);
                inputFeeds.add(input.getName());
                inputPaths.add(inputExpr);

            }
        }
        props.put("ivoryInPaths", join(inputPaths.iterator(), '#'));
        props.put("ivoryInputFeeds", join(inputFeeds.iterator(), '#'));

        // outputs
        List<String> outputFeeds = new ArrayList<String>();
        List<String> outputPaths = new ArrayList<String>();
        if (process.getOutputs() != null) {
            if (coord.getDatasets() == null)
                coord.setDatasets(new DATASETS());
            if (coord.getOutputEvents() == null)
                coord.setOutputEvents(new OUTPUTEVENTS());
           
            for (Output output : process.getOutputs().getOutputs()) {
                SYNCDATASET syncdataset = createDataSet(output.getFeed(), cluster, output.getName(),LocationType.DATA);
View Full Code Here

TOP

Related Classes of org.apache.ivory.oozie.coordinator.DATASETS

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.