public static FlowProcess undelegate( FlowProcess flowProcess ) { if( flowProcess instanceof FlowProcessWrapper ) return ( (FlowProcessWrapper) flowProcess ).getDelegate(); return flowProcess; }
public static synchronized CompressionCodec getCodec( FlowProcess<? extends Configuration> flowProcess, String defaultCodecs ) { Class<? extends CompressionCodec> codecClass = getCodecClass( flowProcess, defaultCodecs, CompressionCodec.class ); if( codecClass == null ) return null; if( flowProcess instanceof FlowProcessWrapper ) flowProcess = ( (FlowProcessWrapper) flowProcess ).getDelegate(); return ReflectionUtils.newInstance( codecClass, flowProcess.getConfig() ); }
public static synchronized CompressionCodec getCodec( FlowProcess<? extends Configuration> flowProcess, String defaultCodecs ) { Class<? extends CompressionCodec> codecClass = getCodecClass( flowProcess, defaultCodecs, CompressionCodec.class ); if( codecClass == null ) return null; if( flowProcess instanceof FlowProcessWrapper ) flowProcess = ( (FlowProcessWrapper) flowProcess ).getDelegate(); return ReflectionUtils.newInstance( codecClass, flowProcess.getConfig() ); }
@Override public void sinkPrepare( FlowProcess<? extends Properties> flowProcess, SinkCall<PrintWriter, OutputStream> sinkCall ) throws IOException { if( !( flowProcess instanceof FlowProcessWrapper ) ) throw new RuntimeException( "not a flow process wrapper" ); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"sink-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); flowProcess = ( (FlowProcessWrapper) flowProcess ).getDelegate(); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"process-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); super.sinkPrepare( flowProcess, sinkCall ); } }
@Override public void prepare( FlowProcess flowProcess, OperationCall operationCall ) { if( !( flowProcess instanceof FlowProcessWrapper ) ) throw new RuntimeException( "not a flow process wrapper" ); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"pipe-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); if( supportsNodeConfig && !"node-replace".equals( flowProcess.getProperty( "default-node" ) ) ) throw new RuntimeException( "not replaced value" ); flowProcess = ( (FlowProcessWrapper) flowProcess ).getDelegate(); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"process-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); }
@Override public void prepare( FlowProcess flowProcess, OperationCall operationCall ) { if( !( flowProcess instanceof FlowProcessWrapper ) ) throw new RuntimeException( "not a flow process wrapper" ); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"pipe-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); if( supportsNodeConfig && !"node-replace".equals( flowProcess.getProperty( "default-node" ) ) ) throw new RuntimeException( "not replaced value" ); flowProcess = ( (FlowProcessWrapper) flowProcess ).getDelegate(); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"process-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); }
@Override public void sourcePrepare( FlowProcess<? extends Properties> flowProcess, SourceCall<LineNumberReader, InputStream> sourceCall ) throws IOException { if( !( flowProcess instanceof FlowProcessWrapper ) ) throw new RuntimeException( "not a flow process wrapper" ); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"source-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); flowProcess = ( (FlowProcessWrapper) flowProcess ).getDelegate(); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"process-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); super.sourcePrepare( flowProcess, sourceCall ); }
@Override public void sinkPrepare( FlowProcess<? extends Configuration> flowProcess, SinkCall<Object[], OutputCollector> sinkCall ) throws IOException { if( !( flowProcess instanceof FlowProcessWrapper ) ) throw new RuntimeException( "not a flow process wrapper" ); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"sink-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); flowProcess = ( (FlowProcessWrapper) flowProcess ).getDelegate(); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"process-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); super.sinkPrepare( flowProcess, sinkCall ); } }
@Override public void sinkPrepare( FlowProcess<? extends Configuration> flowProcess, SinkCall<Object[], OutputCollector> sinkCall ) throws IOException { if( !( flowProcess instanceof FlowProcessWrapper ) ) throw new RuntimeException( "not a flow process wrapper" ); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"sink-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); flowProcess = ( (FlowProcessWrapper) flowProcess ).getDelegate(); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"process-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); super.sinkPrepare( flowProcess, sinkCall ); } }
@Override public void sourcePrepare( FlowProcess<? extends Configuration> flowProcess, SourceCall<Object[], RecordReader> sourceCall ) { if( !( flowProcess instanceof FlowProcessWrapper ) ) throw new RuntimeException( "not a flow process wrapper" ); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"source-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); if( supportsNodeConfig && !"node-replace".equals( flowProcess.getProperty( "default-node" ) ) ) throw new RuntimeException( "not replaced value" ); flowProcess = ( (FlowProcessWrapper) flowProcess ).getDelegate(); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"process-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); super.sourcePrepare( flowProcess, sourceCall ); }
@Override public void sourcePrepare( FlowProcess<? extends Configuration> flowProcess, SourceCall<Object[], RecordReader> sourceCall ) { if( !( flowProcess instanceof FlowProcessWrapper ) ) throw new RuntimeException( "not a flow process wrapper" ); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"source-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); if( supportsNodeConfig && !"node-replace".equals( flowProcess.getProperty( "default-node" ) ) ) throw new RuntimeException( "not replaced value" ); flowProcess = ( (FlowProcessWrapper) flowProcess ).getDelegate(); if( !"process-default".equals( flowProcess.getProperty( "default" ) ) ) throw new RuntimeException( "not default value" ); if( !"process-replace".equals( flowProcess.getProperty( "replace" ) ) ) throw new RuntimeException( "not replaced value" ); super.sourcePrepare( flowProcess, sourceCall ); }