@Override public String getName() { return Pipe.id( this ); }
private Collection<LogicalOutput> findLogicalOutputs( Pipe element ) { String id = Pipe.id( element ); return outputMultiMap.getValues( id ); }
private LogicalInput findLogicalInput( Pipe element ) { String id = Pipe.id( element ); LogicalInput logicalInput = inputMap.get( id ); if( logicalInput == null ) logicalInput = inputMap.get( flowProcess.getStringProperty( "cascading.node.source." + id ) ); if( logicalInput == null ) throw new IllegalStateException( "could not find input for: " + element ); return logicalInput; }
private LogicalOutput findLogicalOutput( Pipe element ) { String id = Pipe.id( element ); LogicalOutput logicalOutput = outputMap.get( id ); if( logicalOutput == null ) logicalOutput = outputMap.get( flowProcess.getStringProperty( "cascading.node.sink." + id ) ); if( logicalOutput == null ) throw new IllegalStateException( "could not find output for: " + element ); return logicalOutput; }
private LogicalInput findLogicalInput( Pipe element ) { String id = Pipe.id( element ); LogicalInput logicalInput = inputMap.get( id ); if( logicalInput == null ) logicalInput = inputMap.get( flowProcess.getStringProperty( "cascading.node.source." + id ) ); if( logicalInput == null ) throw new IllegalStateException( "could not find input for: " + element ); return logicalInput; }
private LogicalOutput findLogicalOutput( Pipe element ) { String id = Pipe.id( element ); LogicalOutput logicalOutput = outputMap.get( id ); if( logicalOutput == null ) logicalOutput = outputMap.get( flowProcess.getStringProperty( "cascading.node.sink." + id ) ); if( logicalOutput == null ) throw new IllegalStateException( "could not find output for: " + element ); return logicalOutput; }
private Collection<LogicalOutput> findLogicalOutputs( Pipe element ) { String id = Pipe.id( element ); return outputMultiMap.getValues( id ); }
public static String id( FlowElement flowElement ) { if( flowElement instanceof Pipe ) return Pipe.id( (Pipe) flowElement ); if( flowElement instanceof Tap ) return Tap.id( (Tap) flowElement ); String id = Util.returnInstanceFieldIfExistsSafe( flowElement, "id" ); if( id != null ) return id; throw new IllegalArgumentException( "id not supported for: " + flowElement.getClass().getCanonicalName() ); }
@Override public void prepare() { try { if( logicalInputs != null ) { for( LogicalInput logicalInput : logicalInputs.getValues() ) { LOG.info( "calling {}#start() on: {} {}, for {} inputs", logicalInput.getClass().getSimpleName(), getSplice(), Pipe.id( getSplice() ), logicalInputs.getValues().size() ); logicalInput.start(); } } if( logicalOutput != null ) { LOG.info( "calling {}#start() on: {} {}", logicalOutput.getClass().getSimpleName(), getSplice(), Pipe.id( getSplice() ) ); logicalOutput.start(); } } catch( Exception exception ) { throw new CascadingException( "unable to start input/output", exception ); } super.prepare(); }
@Override public void prepare() { try { if( logicalInputs != null ) { for( LogicalInput logicalInput : logicalInputs.getValues() ) { LOG.info( "calling {}#start() on: {} {}, for {} inputs", logicalInput.getClass().getSimpleName(), getSplice(), Pipe.id( getSplice() ), logicalInputs.getValues().size() ); logicalInput.start(); } } if( logicalOutput != null ) { LOG.info( "calling {}#start() on: {} {}", logicalOutput.getClass().getSimpleName(), getSplice(), Pipe.id( getSplice() ) ); logicalOutput.start(); } } catch( Exception exception ) { throw new CascadingException( "unable to start input/output", exception ); } super.prepare(); }
@Override public void prepare() { try { if( logicalInput != null ) { LOG.info( "calling {}#start() on: {} {}", logicalInput.getClass().getSimpleName(), getBoundary(), Pipe.id( getBoundary() ) ); logicalInput.start(); } if( logicalOutputs != null ) { for( LogicalOutput logicalOutput : logicalOutputs ) { LOG.info( "calling {}#start() on: {} {}", logicalOutput.getClass().getSimpleName(), getBoundary(), Pipe.id( getBoundary() ) ); logicalOutput.start(); } } } catch( Exception exception ) { throw new CascadingException( "unable to start input/output", exception ); } if( role != IORole.source ) collector = new MeasuredOutputCollector( flowProcess, SliceCounters.Write_Duration, createOutputCollector() ); super.prepare(); }
@Override public void prepare() { try { if( logicalInput != null ) { LOG.info( "calling {}#start() on: {} {}", logicalInput.getClass().getSimpleName(), getBoundary(), Pipe.id( getBoundary() ) ); logicalInput.start(); } if( logicalOutputs != null ) { for( LogicalOutput logicalOutput : logicalOutputs ) { LOG.info( "calling {}#start() on: {} {}", logicalOutput.getClass().getSimpleName(), getBoundary(), Pipe.id( getBoundary() ) ); logicalOutput.start(); } } } catch( Exception exception ) { throw new CascadingException( "unable to start input/output", exception ); } if( role != IORole.source ) collector = new MeasuredOutputCollector( flowProcess, SliceCounters.Write_Duration, createOutputCollector() ); super.prepare(); }
@Override public void prepare() { try { if( logicalInputs != null ) { for( LogicalInput logicalInput : logicalInputs.getValues() ) { LOG.info( "calling {}#start() on: {} {}, for {} inputs", logicalInput.getClass().getSimpleName(), getSplice(), Pipe.id( getSplice() ), logicalInputs.getValues().size() ); logicalInput.start(); } } if( logicalOutputs != null ) { for( LogicalOutput logicalOutput : logicalOutputs ) { LOG.info( "calling {}#start() on: {} {}", logicalOutput.getClass().getSimpleName(), getSplice(), Pipe.id( getSplice() ) ); logicalOutput.start(); } } } catch( Exception exception ) { throw new CascadingException( "unable to start input/output", exception ); } if( role != IORole.source ) collector = new MeasuredOutputCollector( flowProcess, SliceCounters.Write_Duration, createOutputCollector() ); super.prepare(); }
@Override public void prepare() { try { if( logicalInputs != null ) { for( LogicalInput logicalInput : logicalInputs.getValues() ) { LOG.info( "calling {}#start() on: {} {}, for {} inputs", logicalInput.getClass().getSimpleName(), getSplice(), Pipe.id( getSplice() ), logicalInputs.getValues().size() ); logicalInput.start(); } } if( logicalOutputs != null ) { for( LogicalOutput logicalOutput : logicalOutputs ) { LOG.info( "calling {}#start() on: {} {}", logicalOutput.getClass().getSimpleName(), getSplice(), Pipe.id( getSplice() ) ); logicalOutput.start(); } } } catch( Exception exception ) { throw new CascadingException( "unable to start input/output", exception ); } if( role != IORole.source ) collector = new MeasuredOutputCollector( flowProcess, SliceCounters.Write_Duration, createOutputCollector() ); super.prepare(); }