Package com.alibaba.otter.shared.common.model.config.pipeline

Examples of com.alibaba.otter.shared.common.model.config.pipeline.Pipeline


        dbLoadAction = (DbLoadAction) TestedObject.getSpringBeanFactory().getBean("dbLoadAction");

        final Channel channel = new Channel();
        channel.setId(1L);

        final Pipeline pipeline = new Pipeline();
        pipeline.setId(100L);
        List<DataMediaPair> pairs = generatorDataMediaPairForMysql(20);
        pipeline.setPairs(pairs);
        pipeline.getParameters().merge(new SystemParameter());
        pipeline.getParameters().merge(new ChannelParameter());
        // pipeline.getParameters().setChannelInfo("LJH_DEMO");

        // final Pipeline oppositePipeline = new Pipeline();
        // oppositePipeline.setId(101L);
        channel.setPipelines(Arrays.asList(pipeline));
View Full Code Here


    @Mocked
    private ConfigClientService configClientService;

    @Test
    public void test_load_file() {
        final Pipeline pipeline = new Pipeline();
        pipeline.setId(100L);
        List<DataMediaPair> pairs = generatorDataMediaPair(10);
        pipeline.setPairs(pairs);
        new NonStrictExpectations() {

            {
                configClientService.findPipeline(anyLong);
                returns(pipeline);
View Full Code Here

    @SpringBeanByName
    private OtterTransformerFactory otterTransformFactory;

    @Test
    public void test_rowData_mysql_oracle() {
        final Pipeline pipeline = new Pipeline();
        pipeline.setId(100L);

        List<DataMediaPair> pairs = new ArrayList<DataMediaPair>();
        DataMediaPair pair1 = new DataMediaPair();
        pair1.setId(1L);
        pair1.setPipelineId(pipeline.getId());
        pair1.setPullWeight(1L);
        pair1.setPushWeight(1L);

        DbDataMedia mysqlMedia = getMysqlMedia();
        mysqlMedia.setId(1L);
        pair1.setSource(mysqlMedia);

        DbDataMedia oracleMedia = getOracleMedia();
        pair1.setTarget(oracleMedia);
        pairs.add(pair1);
        pipeline.setPairs(pairs);
        PipelineParameter param = new PipelineParameter();
        param.setSyncMode(SyncMode.ROW);

        pipeline.setParameters(param);
        new NonStrictExpectations() {

            {
                configClientService.findPipeline(anyLong);
                returns(pipeline);
View Full Code Here

        want.number(result.getDatas().size()).isEqualTo(1);
    }

    @Test
    public void test_rowData_oracle_mysql() {
        final Pipeline pipeline = new Pipeline();
        pipeline.setId(100L);

        List<DataMediaPair> pairs = new ArrayList<DataMediaPair>();
        DataMediaPair pair1 = new DataMediaPair();
        pair1.setId(1L);
        pair1.setPipelineId(pipeline.getId());
        pair1.setPullWeight(1L);
        pair1.setPushWeight(1L);

        DbDataMedia oracleMedia = getOracleMedia();
        oracleMedia.setId(1L);
        pair1.setSource(oracleMedia);

        DbDataMedia mysqlMedia = getMysqlMedia();
        pair1.setTarget(mysqlMedia);

        pairs.add(pair1);
        pipeline.setPairs(pairs);
        PipelineParameter param = new PipelineParameter();
        param.setSyncMode(SyncMode.ROW);

        pipeline.setParameters(param);
        new NonStrictExpectations() {

            {
                configClientService.findPipeline(anyLong);
                returns(pipeline);
View Full Code Here

        want.number(result.getDatas().size()).isEqualTo(1);
    }

    @Test
    public void test_fileData() {
        final Pipeline pipeline = new Pipeline();
        pipeline.setId(100L);

        List<DataMediaPair> pairs = new ArrayList<DataMediaPair>();
        DataMediaPair pair1 = new DataMediaPair();
        pair1.setId(1L);
        pair1.setPipelineId(pipeline.getId());
        pair1.setPullWeight(1L);
        pair1.setPushWeight(1L);

        DbDataMedia oracleMedia = getOracleMedia();
        oracleMedia.setId(1L);
        pair1.setSource(oracleMedia);

        DbDataMedia mysqlMedia = getMysqlMedia();
        pair1.setTarget(mysqlMedia);

        pairs.add(pair1);
        pipeline.setPairs(pairs);
        new NonStrictExpectations() {

            {
                configClientService.findPipeline(anyLong);
                returns(pipeline);
View Full Code Here

                return channel;
            }

            @Mock
            public Pipeline getOppositePipeline(Long pipelineId) {
                Pipeline pipeline = new Pipeline();
                pipeline.setId(pipelineId);
                return pipeline;
            }

            @Mock
            public Pipeline getPipeline(Long pipelineId) {
                Pipeline pipeline = new Pipeline();
                pipeline.setSelectNodes(sourceList);
                pipeline.setExtractNodes(sourceList);
                pipeline.setLoadNodes(targetList);
                return pipeline;
            }

        });
View Full Code Here

                return channel;
            }

            @Mock
            public Pipeline getOppositePipeline(Long pipelineId) {
                Pipeline pipeline = new Pipeline();
                pipeline.setId(oppositePipelineId);
                return pipeline;
            }

        });
View Full Code Here

    public void test_attachment() {
        final Node currentNode = new Node();
        currentNode.setId(1L);
        currentNode.setIp("127.0.0.1");
        currentNode.setParameters(new NodeParameter());
        final Pipeline pipeline = new Pipeline();
        pipeline.getParameters().setRetriever(RetrieverType.ARIA2C);
        // mock一下
        new NonStrictExpectations() {

            {
                configClientService.currentNode();
View Full Code Here

    public void test_rowData() {
        final Node currentNode = new Node();
        currentNode.setId(1L);
        currentNode.setIp("127.0.0.1");
        currentNode.setParameters(new NodeParameter());
        final Pipeline pipeline = new Pipeline();
        pipeline.getParameters().setRetriever(RetrieverType.ARIA2C);
        // mock一下
        new NonStrictExpectations() {

            {
                configClientService.currentNode();
View Full Code Here

        System.setProperty("nid", "1");
    }

    @Test
    public void test_localFile() {
        final Pipeline pipeline = new Pipeline();
        pipeline.setId(100L);

        final Node currentNode = new Node();
        currentNode.setId(1L);
        new NonStrictExpectations() {
View Full Code Here

TOP

Related Classes of com.alibaba.otter.shared.common.model.config.pipeline.Pipeline

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.