Examples of WorkflowApp


Examples of org.apache.falcon.oozie.workflow.WORKFLOWAPP

        if (!new File(path).exists()) {
            Assert.assertTrue(new File(path).mkdirs());
        }
        Process process = ConfigurationStore.get().get(EntityType.PROCESS, "clicksummary");

        WORKFLOWAPP parentWorkflow = initializeProcessMapper(process, "12", "360");
        testParentWorkflow(process, parentWorkflow);
    }
View Full Code Here

Examples of org.apache.falcon.oozie.workflow.WORKFLOWAPP

    public void testBundle1() throws Exception {
        Process process = ConfigurationStore.get().get(EntityType.PROCESS, "clicksummary");
        process.setFrequency(Frequency.fromString("minutes(1)"));
        process.setTimeout(Frequency.fromString("minutes(15)"));

        WORKFLOWAPP parentWorkflow = initializeProcessMapper(process, "30", "15");
        testParentWorkflow(process, parentWorkflow);
    }
View Full Code Here

Examples of org.apache.falcon.oozie.workflow.WORKFLOWAPP

    public void testPigProcessMapper() throws Exception {
        Process process = ConfigurationStore.get().get(EntityType.PROCESS, "pig-process");
        Assert.assertEquals("pig", process.getWorkflow().getEngine().value());

        prepare(process);
        WORKFLOWAPP parentWorkflow = initializeProcessMapper(process, "12", "360");
        testParentWorkflow(process, parentWorkflow);

        List<Object> decisionOrForkOrJoin = parentWorkflow.getDecisionOrForkOrJoin();

        ACTION pigActionNode = (ACTION) decisionOrForkOrJoin.get(3);
        Assert.assertEquals("user-pig-job", pigActionNode.getName());

        final PIG pigAction = pigActionNode.getPig();
View Full Code Here

Examples of org.apache.falcon.oozie.workflow.WORKFLOWAPP

                Assert.assertEquals(entry.getValue(), expected.get(entry.getKey()));
            }
        }

        String wfPath = coord.getAction().getWorkflow().getAppPath().replace("${nameNode}", "");
        WORKFLOWAPP parentWorkflow = getParentWorkflow(new Path(wfPath));
        testParentWorkflow(process, parentWorkflow);

        List<Object> decisionOrForkOrJoin = parentWorkflow.getDecisionOrForkOrJoin();

        ACTION hiveNode = (ACTION) decisionOrForkOrJoin.get(4);
        Assert.assertEquals("user-hive-job", hiveNode.getName());

        JAXBElement<org.apache.falcon.oozie.hive.ACTION> actionJaxbElement = OozieUtils.unMarshalHiveAction(hiveNode);
View Full Code Here

Examples of org.apache.falcon.oozie.workflow.WORKFLOWAPP

        // verify the post processing params
        Assert.assertEquals(props.get("feedNames"), process.getOutputs().getOutputs().get(0).getFeed());
        Assert.assertEquals(props.get("feedInstancePaths"), "${coord:dataOut('output')}");

        String wfPath = coord.getAction().getWorkflow().getAppPath().replace("${nameNode}", "");
        WORKFLOWAPP parentWorkflow = getParentWorkflow(new Path(wfPath));

        Assert.assertTrue(Storage.TYPE.TABLE == ProcessHelper.getStorageType(cluster, process));
        assertHCatCredentials(parentWorkflow, wfPath);
    }
View Full Code Here

Examples of org.apache.falcon.oozie.workflow.WORKFLOWAPP

    @SuppressWarnings("unchecked")
    private void assertLibExtensions(COORDINATORAPP coord) throws Exception {
        String wfPath = coord.getAction().getWorkflow().getAppPath().replace("${nameNode}", "");
        JAXBContext jaxbContext = JAXBContext.newInstance(WORKFLOWAPP.class);
        WORKFLOWAPP wf = ((JAXBElement<WORKFLOWAPP>) jaxbContext.createUnmarshaller().unmarshal(
                fs.open(new Path(wfPath, "workflow.xml")))).getValue();
        List<Object> actions = wf.getDecisionOrForkOrJoin();
        for (Object obj : actions) {
            if (!(obj instanceof ACTION)) {
                continue;
            }
            ACTION action = (ACTION) obj;
View Full Code Here

Examples of org.apache.falcon.oozie.workflow.WORKFLOWAPP

        props.put("userWorkflowEngine", processWorkflow.getEngine().value());
    }

    protected void createWorkflow(Cluster cluster, Process process, Workflow processWorkflow,
                                  String wfName, Path parentWfPath) throws FalconException {
        WORKFLOWAPP wfApp = getWorkflowTemplate(DEFAULT_WF_TEMPLATE);
        wfApp.setName(wfName);
        try {
            addLibExtensionsToWorkflow(cluster, wfApp, EntityType.PROCESS, null);
        } catch (IOException e) {
            throw new FalconException("Failed to add library extensions for the workflow", e);
        }

        final boolean isTableStorageType = isTableStorageType(cluster, process);
        if (isTableStorageType) {
            setupHiveCredentials(cluster, parentWfPath, wfApp);
        }

        String userWfPath = getUserWorkflowPath(cluster, parentWfPath.getParent()).toString();
        EngineType engineType = processWorkflow.getEngine();
        for (Object object : wfApp.getDecisionOrForkOrJoin()) {
            if (!(object instanceof ACTION)) {
                continue;
            }

            ACTION action = (ACTION) object;
View Full Code Here

Examples of org.apache.falcon.oozie.workflow.WORKFLOWAPP

            return retentionAction;
        }

        private void createRetentionWorkflow(Cluster cluster, Path wfPath, String wfName) throws FalconException {
            try {
                WORKFLOWAPP retWfApp = getWorkflowTemplate(RETENTION_WF_TEMPLATE);
                retWfApp.setName(wfName);
                addLibExtensionsToWorkflow(cluster, retWfApp, EntityType.FEED, "retention");
                addOozieRetries(retWfApp);

                if (isTableStorageType(cluster, entity)) {
                    setupHiveCredentials(cluster, wfPath, retWfApp);
View Full Code Here

Examples of org.apache.falcon.oozie.workflow.WORKFLOWAPP

         * @param wfName workflow name
         * @throws FalconException
         */
        private void createReplicationWorkflow(Cluster targetCluster, Cluster sourceCluster,
                                               Path wfPath, String wfName) throws FalconException {
            WORKFLOWAPP repWFapp = getWorkflowTemplate(REPLICATION_WF_TEMPLATE);
            repWFapp.setName(wfName);

            try {
                addLibExtensionsToWorkflow(targetCluster, repWFapp, EntityType.FEED, "replication");
            } catch (IOException e) {
                throw new FalconException("Unable to add lib extensions to workflow", e);
View Full Code Here

Examples of org.apache.falcon.oozie.workflow.WORKFLOWAPP

        Assert.assertEquals(props.get("jobPriority"), "NORMAL");
        Assert.assertEquals(props.get("maxMaps"), "5");
        Assert.assertEquals(props.get("mapBandwidthKB"), "102400");

        assertLibExtensions(coord, "replication");
        WORKFLOWAPP wf = getWorkflowapp(coord);
        assertWorkflowRetries(wf);

        Assert.assertFalse(Storage.TYPE.TABLE == FeedHelper.getStorageType(feed, trgCluster));
    }
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.