Package org.apache.falcon.entity.v0.process

Examples of org.apache.falcon.entity.v0.process.Property


        parser.parseAndValidate(process.toString());
    }

    @Test(expectedExceptions = FalconException.class)
    public void testInvalidProcessName() throws Exception {
        Process process = parser
                .parseAndValidate((ProcessEntityParserTest.class
                        .getResourceAsStream(PROCESS_XML)));
        process.setName("name_with_underscore");
        parser.parseAndValidate(process.toString());
    }
View Full Code Here


        parser.parseAndValidate(process.toString());
    }

    @Test
    public void testOozieFutureExpression() throws Exception {
        Process process = parser
                .parseAndValidate((ProcessEntityParserTest.class
                        .getResourceAsStream(PROCESS_XML)));
        process.getInputs().getInputs().get(0).setStart("future(1,2)");
        parser.parseAndValidate(process.toString());
    }
View Full Code Here

        parser.parseAndValidate(process.toString());
    }

    @Test
    public void testOozieLatestExpression() throws Exception {
        Process process = parser
                .parseAndValidate((ProcessEntityParserTest.class
                        .getResourceAsStream(PROCESS_XML)));
        process.getInputs().getInputs().get(0).setStart("latest(-1)");
        parser.parseAndValidate(process.toString());
    }
View Full Code Here

        parser.parseAndValidate(process.toString());
    }

    @Test(expectedExceptions = ValidationException.class)
    public void testDuplicateClusterName() throws Exception {
        Process process = parser
                .parse((ProcessEntityParserTest.class
                        .getResourceAsStream(PROCESS_XML)));
        process.getClusters().getClusters().add(1, process.getClusters().getClusters().get(0));
        parser.validate(process);
    }
View Full Code Here

        Feed outFeed = (Feed) EntityType.FEED.getUnmarshaller().unmarshal(
                this.getClass().getResource("/config/feed/hive-table-feed-out.xml"));
        getStore().publish(EntityType.FEED, outFeed);

        Process process = parser.parse(
                ProcessEntityParserTest.class.getResourceAsStream("/config/process/process-table.xml"));
        Input input = process.getInputs().getInputs().get(0);
        Assert.assertFalse(input.isOptional());
        parser.validate(process);

        // Test Optional Inputs For Table Storage
        try {
View Full Code Here

        }
    }

    @Test(expectedExceptions = ValidationException.class)
    public void testValidateInputPartitionForTable() throws Exception {
        Process process = parser.parse(
                ProcessEntityParserTest.class.getResourceAsStream("/config/process/process-table.xml"));
        if (process.getInputs() != null) {
            for (Input input : process.getInputs().getInputs()) {
                input.setPartition("region=usa");
            }
        }

        parser.validate(process);
View Full Code Here

            return null;
        }

        Cluster cluster = CONFIG_STORE.get(EntityType.CLUSTER, processCluster.getName());
        Path bundlePath = new Path(ClusterHelper.getLocation(cluster, "staging"), EntityUtil.getStagingPath(process));
        Process processClone = (Process) process.copy();
        EntityUtil.setStartDate(processClone, clusterName, startDate);

        OozieProcessMapper mapper = new OozieProcessMapper(processClone);
        if (!mapper.map(cluster, bundlePath)) {
            return null;
View Full Code Here

            feed.setName(name);
            store.publish(type, feed);
            break;

        case PROCESS:
            Process process = (Process) unmarshaller.unmarshal(this.getClass().getResource(resource));
            process.setName(name);
            store.publish(type, process);
            break;

        default:
        }
View Full Code Here

        STORE.publish(EntityType.FEED, feed1);
        STORE.publish(EntityType.FEED, feed2);
        STORE.publish(EntityType.FEED, feed3);

        Process process1 = (Process) EntityType.PROCESS.getUnmarshaller()
                .unmarshal(this.getClass().getResource(PROCESS1_XML));
        STORE.publish(EntityType.PROCESS, process1);
        Process process2 = (Process) EntityType.PROCESS.getUnmarshaller()
                .unmarshal(this.getClass().getResource(PROCESS2_XML));
        STORE.publish(EntityType.PROCESS, process2);
    }
View Full Code Here

     * @param bundlePath - bundle path
     * @return COORDINATORAPP
     * @throws FalconException on Error
     */
    public COORDINATORAPP createDefaultCoordinator(Cluster cluster, Path bundlePath) throws FalconException {
        Process process = getEntity();
        if (process == null) {
            return null;
        }

        COORDINATORAPP coord = new COORDINATORAPP();
        String coordName = EntityUtil.getWorkflowName(Tag.DEFAULT, process).toString();
        Path coordPath = getCoordPath(bundlePath, coordName);

        // coord attributes
        initializeCoordAttributes(cluster, process, coord, coordName);

        CONTROLS controls = initializeControls(process); // controls
        coord.setControls(controls);

        // Configuration
        Map<String, String> props = createCoordDefaultConfiguration(cluster, coordPath, coordName);

        initializeInputPaths(cluster, process, coord, props); // inputs
        initializeOutputPaths(cluster, process, coord, props)// outputs

        Workflow processWorkflow = process.getWorkflow();
        props.put("userWorkflowEngine", processWorkflow.getEngine().value());

        // create parent wf
        createWorkflow(cluster, process, processWorkflow, coordName, coordPath);

View Full Code Here

TOP

Related Classes of org.apache.falcon.entity.v0.process.Property

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.