@Test public void testCopyConfig() throws Exception { Tap source = new Lfs( new TextLine(), "input/path" ); Tap sink = new Hfs( new TextLine(), "output/path", SinkMode.REPLACE ); Pipe pipe = new Pipe( "test" ); Configuration conf = ( (BaseHadoopPlatform) getPlatform() ).getConfiguration(); conf.set( AppProps.APP_NAME, "testname" ); AppProps props = AppProps.appProps().setVersion( "1.2.3" ); Properties properties = props.buildProperties( conf ); // convert job conf to properties instance Flow flow = getPlatform().getFlowConnector( properties ).connect( source, sink, pipe ); assertEquals( "testname", flow.getProperty( AppProps.APP_NAME ) ); assertEquals( "1.2.3", flow.getProperty( AppProps.APP_VERSION ) ); }
@Test public void testCopyConfig() throws Exception { Tap source = new Lfs( new TextLine(), "input/path" ); Tap sink = new Hfs( new TextLine(), "output/path", SinkMode.REPLACE ); Pipe pipe = new Pipe( "test" ); Configuration conf = ( (BaseHadoopPlatform) getPlatform() ).getConfiguration(); conf.set( AppProps.APP_NAME, "testname" ); AppProps props = AppProps.appProps().setVersion( "1.2.3" ); Properties properties = props.buildProperties( conf ); // convert job conf to properties instance Flow flow = getPlatform().getFlowConnector( properties ).connect( source, sink, pipe ); assertEquals( "testname", flow.getProperty( AppProps.APP_NAME ) ); assertEquals( "1.2.3", flow.getProperty( AppProps.APP_VERSION ) ); }