@Test public void testSourceConfInit() throws IOException { getPlatform().copyFromLocal( inputFileNums20 ); Scheme scheme = new SchemeWithProperties( new Fields( "line" ) ); Tap source = getPlatform().getTap( scheme, inputFileNums20, SinkMode.KEEP ); Pipe pipe = new Pipe( "test" ); Tap sink = getPlatform().getTextFile( getOutputPath( "sourceconfinit" ), SinkMode.REPLACE ); Properties properties = new Properties(); properties.setProperty( "default", "connector-default" ); properties.setProperty( "replace", "connector-replace" ); Flow flow = getPlatform().getFlowConnector( properties ).connect( source, sink, pipe ); flow.complete(); assertTrue( flow.resourceExists( sink ) ); }
@Test public void testSinkConfInit() throws IOException { getPlatform().copyFromLocal( inputFileNums20 ); Tap source = getPlatform().getTextFile( new Fields( "line" ), inputFileNums20, SinkMode.KEEP ); Pipe pipe = new Pipe( "test" ); Scheme scheme = new SchemeWithProperties( new Fields( "line" ) ); Tap sink = getPlatform().getTap( scheme, getOutputPath( "sinkconfinit" ), SinkMode.REPLACE ); Properties properties = new Properties(); properties.setProperty( "default", "connector-default" ); properties.setProperty( "replace", "connector-replace" ); Flow flow = getPlatform().getFlowConnector( properties ).connect( source, sink, pipe ); flow.complete(); assertTrue( flow.resourceExists( sink ) ); }