Examples of PipelineWorkflow


Examples of uk.org.ogsadai.client.toolkit.PipelineWorkflow

            Connection connection,
            RequestNodeInput targetInput) throws ExchangeException
    {
        RequestNode source = connection.getSource();
        Location sourceLocation = (Location)source.getAnnotation(AnnotationKeys.LOCATION);
        PipelineWorkflow sourcePipeline = mWorkflows.get(sourceLocation);
        ProcessingElement sourcePE = mPEs.get(source);

        RequestNode target = targetInput.getRequestNode();
        Location targetLocation = (Location)target.getAnnotation(AnnotationKeys.LOCATION);
        PipelineWorkflow targetPipeline = mWorkflows.get(targetLocation);
        ProcessingElement targetPE = mPEs.get(target);

        Exchange exchange = mResultsFactory.createAndInsertExchange(
                connection, targetInput,
                sourcePipeline, sourcePE,
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.PipelineWorkflow

    }

    protected Exchange createResultDataSource(ResultNode node)
    {
        Location location = (Location)node.getAnnotation(AnnotationKeys.LOCATION);
        PipelineWorkflow pipeline = getWorkflow(node);

        ResultDataSourceExchange exchange =
            new ResultDataSourceExchange(location, node.getResultName());
        WriteToDataSource write = new WriteToDataSource(exchange);
        pipeline.add(write);
        mPEs.put(node, write);
        mResults.add(exchange);
        return exchange;
    }
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.PipelineWorkflow

   
    protected Exchange createExternalOutput(ExternalOutputNode node)
        throws ExchangeException
    {
        Exchange exchange = mExternalTransferFactory.createExchange();
        PipelineWorkflow pipeline = getWorkflow(node);
        ProcessingElement sourcePE = mPEs.get(node.getInput().getSource());
        ProcessingElement pe = mExternalTransferFactory.createExternalOutput(
                exchange, node.getInput(), pipeline, sourcePE);
        mPEs.put(node, pe);
        mDataTransfers.put(node.getResultName(), exchange);
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.PipelineWorkflow

    protected void createExternalInput(ExternalInputNode node)
        throws ExchangeException
    {
        // TODO insert Tee if more than one target - for now we use only one
        RequestNodeInput target = node.getOutput().getTargets().get(0);
        PipelineWorkflow targetPipeline = getWorkflow(target.getRequestNode());
        ProcessingElement targetPE = mPEs.get(target.getRequestNode());
        ProcessingElement pe = mExternalTransferFactory.createExternalInput(
                null,
                node.getOutput(),
                target, targetPipeline, targetPE);
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.PipelineWorkflow

    }
   
    private PipelineWorkflow getWorkflow(RequestNode node)
    {
        Location location = (Location)node.getAnnotation(AnnotationKeys.LOCATION);
        PipelineWorkflow workflow = mWorkflows.get(location);
        if (workflow == null)
        {
            workflow = new PipelineWorkflow();
            mWorkflows.put(location, workflow);
        }
        return workflow;
    }
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.PipelineWorkflow

    {    
        CreateDataCache createCache = new CreateDataCache();
        DeliverToRequestStatus deliver = new DeliverToRequestStatus();
        deliver.connectInput(createCache.getResultOutput());
       
        PipelineWorkflow workflow = new PipelineWorkflow();
        workflow.add(createCache);
        workflow.add(deliver);
        executeWorkflow(drer, workflow);
        ResourceID cacheID = createCache.nextResult();
       
        String sql = "SELECT name, address FROM littleblackbook WHERE id=7958";
        SQLQuery query = new SQLQuery();
        query.addExpression(sql);
        query.setResourceID("MySQLResource");
        WriteToDataCache write = new WriteToDataCache();
        write.setResourceID(cacheID);
        write.connectDataInput(query.getDataOutput());
       
        PipelineWorkflow toCache = new PipelineWorkflow();
        toCache.add(query);
        toCache.add(write);
        executeWorkflow(drer, toCache);

        ReadFromDataCache read = new ReadFromDataCache();
        read.setResourceID(cacheID);
        TupleToWebRowSetCharArrays tupleToWRS = new TupleToWebRowSetCharArrays();
        tupleToWRS.connectDataInput(read.getResultOutput());
        deliver = new DeliverToRequestStatus();
        deliver.connectInput(tupleToWRS.getResultOutput());
       
        PipelineWorkflow fromCache = new PipelineWorkflow();
        fromCache.add(read);
        fromCache.add(tupleToWRS);
        fromCache.add(deliver);

        long start = System.currentTimeMillis();
        executeWorkflow(drer, fromCache);
        long stop = System.currentTimeMillis();
       
        server.getDataResource(cacheID).destroy();

       
        System.out.println("DATA CACHE: " + (stop-start) + "ms");
       
        query = new SQLQuery();
        query.addExpression(sql);
        query.setResourceID("MySQLResource");
        tupleToWRS = new TupleToWebRowSetCharArrays();
        tupleToWRS.connectDataInput(query.getDataOutput());
        deliver = new DeliverToRequestStatus();
        deliver.connectInput(tupleToWRS.getResultOutput());

        workflow = new PipelineWorkflow();
        workflow.add(query);
        workflow.add(tupleToWRS);
        workflow.add(deliver);
       
        start = System.currentTimeMillis();
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.PipelineWorkflow

    {    
        CreateDataCache createCache = new CreateDataCache();
        DeliverToRequestStatus deliver = new DeliverToRequestStatus();
        deliver.connectInput(createCache.getResultOutput());
       
        PipelineWorkflow workflow = new PipelineWorkflow();
        workflow.add(createCache);
        workflow.add(deliver);
        executeWorkflow(drer, workflow);
        ResourceID cacheID = createCache.nextResult();
       
        String sql = "SELECT name, address FROM littleblackbook WHERE id<100";
        SQLQuery query = new SQLQuery();
        query.addExpression(sql);
        query.setResourceID("MySQLResource");
        WriteToDataCache write = new WriteToDataCache();
        write.setResourceID(cacheID);
        write.connectDataInput(query.getDataOutput());
        TupleToWebRowSetCharArrays tupleToWRS = new TupleToWebRowSetCharArrays();
        tupleToWRS.connectDataInput(query.getDataOutput());
        deliver = new DeliverToRequestStatus();
        deliver.connectInput(tupleToWRS.getResultOutput());
       
        workflow = new PipelineWorkflow();
        workflow.add(query);
        workflow.add(write);
        workflow.add(tupleToWRS);
        workflow.add(deliver);

        long start = System.currentTimeMillis();
        executeWorkflow(drer, workflow);
        long stop = System.currentTimeMillis();
       
        server.getDataResource(cacheID).destroy();
       
        resultCache.add(new Long(stop-start));
       
        query = new SQLQuery();
        query.addExpression(sql);
        query.setResourceID("MySQLResource");
        tupleToWRS = new TupleToWebRowSetCharArrays();
        tupleToWRS.connectDataInput(query.getDataOutput());
        deliver = new DeliverToRequestStatus();
        deliver.connectInput(tupleToWRS.getResultOutput());

        workflow = new PipelineWorkflow();
        workflow.add(query);
        workflow.add(tupleToWRS);
        workflow.add(deliver);
       
        start = System.currentTimeMillis();
        executeWorkflow(drer, workflow);
        stop = System.currentTimeMillis();
       
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.PipelineWorkflow

        PartitionedGraphToWorkflows toWF =
            new PartitionedGraphToWorkflows(factory, factory, mapper, null);
        toWF.createWorkflows(graph);
        assertTrue(toWF.getExchanges().isEmpty());
        assertEquals(1, toWF.getWorkflows().size());
        PipelineWorkflow workflow = toWF.getWorkflows().values().iterator().next();
        Set<String> names = new HashSet<String>();
        names.add("1"); names.add("2"); names.add("3");
        List<?> activities = workflow.getActivities();
        assertEquals(3, activities.size());
        for (Object object : activities)
        {
            Activity activity = (Activity)object;
            assertTrue(names.remove(activity.getActivityName().toString()));
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.PipelineWorkflow

        PartitionedGraphToWorkflows toWF =
            new PartitionedGraphToWorkflows(factory, factory, mapper, null);
        toWF.createWorkflows(graph);
        assertTrue(toWF.getExchanges().isEmpty());
        assertEquals(1, toWF.getWorkflows().size());
        PipelineWorkflow workflow = toWF.getWorkflows().values().iterator().next();
        List<?> activities = workflow.getActivities();
        assertEquals(2, activities.size());
    }
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.PipelineWorkflow

        PartitionedGraphToWorkflows toWF =
            new PartitionedGraphToWorkflows(factory, factory, mapper, null);
        toWF.createWorkflows(graph);
        assertTrue(toWF.getExchanges().isEmpty());
        assertEquals(1, toWF.getWorkflows().size());
        PipelineWorkflow workflow = toWF.getWorkflows().values().iterator().next();
        assertEquals(3, workflow.getActivities().size());
        for (Object activity : workflow.getActivities())
        {
            ProcessingElement pe = (ProcessingElement)activity;
            if (pe.getActivityName().equals("1"))
            {
                TraversableSingleActivityInput input = pe.getInput("control");
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.