本文整理了Java中cascading.pipe.Pipe.id()
方法的一些代码示例,展示了Pipe.id()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Pipe.id()
方法的具体详情如下:
包路径:cascading.pipe.Pipe
类名称:Pipe
方法名:id
[英]Field id
[中]字段id
代码示例来源:origin: cwensel/cascading
@Override
public String getName()
{
return Pipe.id( this );
}
代码示例来源:origin: cwensel/cascading
private Collection<LogicalOutput> findLogicalOutputs( Pipe element )
{
String id = Pipe.id( element );
return outputMultiMap.getValues( id );
}
代码示例来源:origin: cwensel/cascading
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;
}
代码示例来源:origin: cwensel/cascading
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;
}
代码示例来源:origin: cascading/cascading-hadoop2-tez
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;
}
代码示例来源:origin: cascading/cascading-hadoop2-tez
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;
}
代码示例来源:origin: cascading/cascading-hadoop2-tez
private Collection<LogicalOutput> findLogicalOutputs( Pipe element )
{
String id = Pipe.id( element );
return outputMultiMap.getValues( id );
}
代码示例来源:origin: cwensel/cascading
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() );
}
代码示例来源:origin: cwensel/cascading
@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();
}
代码示例来源:origin: cascading/cascading-hadoop2-tez
@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();
}
代码示例来源:origin: cwensel/cascading
@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();
}
代码示例来源:origin: cascading/cascading-hadoop2-tez
@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();
}
代码示例来源:origin: cwensel/cascading
@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();
}
代码示例来源:origin: cascading/cascading-hadoop2-tez
@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();
}
内容来源于网络,如有侵权,请联系作者删除!