本文整理了Java中cascading.flow.Flow.getSources()
方法的一些代码示例,展示了Flow.getSources()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.getSources()
方法的具体详情如下:
包路径:cascading.flow.Flow
类名称:Flow
方法名:getSources
[英]Method getSources returns the sources of this Flow object.
[中]方法getSources返回此流对象的源。
代码示例来源:origin: LiveRamp/cascading_ext
.format(" with input ").format(prettyTaps(flow.getSources())).format("\n")
.format(" and output ").format(prettyTaps(flow.getSinks())).format("\n");
代码示例来源:origin: cwensel/cascading
@Override
public void onStarting( Flow flow )
{
Map<String, Tap> sources = flow.getSources();
for( Map.Entry<String, Tap> entry : sources.entrySet() )
{
String key = entry.getKey();
Tap value = entry.getValue();
Set<Hfs> taps = Util.createIdentitySet();
accumulate( taps, value );
for( Hfs tap : taps )
{
if( !testExists( flow, tap ) )
throw new FlowException( "cannot start flow: " + flow.getName() + ", _SUCCESS file missing in tap: '" + key + "', at: " + value.getIdentifier() );
}
}
}
代码示例来源:origin: cascading/cascading-hadoop2-common
@Override
public void onStarting( Flow flow )
{
Map<String, Tap> sources = flow.getSources();
for( Map.Entry<String, Tap> entry : sources.entrySet() )
{
String key = entry.getKey();
Tap value = entry.getValue();
Set<Hfs> taps = Util.createIdentitySet();
accumulate( taps, value );
for( Hfs tap : taps )
{
if( !testExists( flow, tap ) )
throw new FlowException( "cannot start flow: " + flow.getName() + ", _SUCCESS file missing in tap: '" + key + "', at: " + value.getIdentifier() );
}
}
}
代码示例来源:origin: cascading/lingual-core
private void initializeSchema( SQLPlanner sqlPlanner, Flow flowDef, TapSchema currentTapSchema )
{
if( sqlPlanner.getDefaultSchema() != null )
currentTapSchema = createGetTapSchema( currentTapSchema, getDefaultSchema() );
SchemaDef currentSchemaDef = new SchemaDef();
if( sqlPlanner.getDefaultSchema() != null )
currentSchemaDef = createGetSchemaDef( currentSchemaDef, getDefaultSchema() );
addTaps( currentSchemaDef, currentTapSchema, flowDef.getSources(), new Function<Tap, Fields>()
{
@Override
public Fields apply( Tap input )
{
return input.getSourceFields();
}
} );
addTaps( currentSchemaDef, currentTapSchema, flowDef.getSinks(), new Function<Tap, Fields>()
{
@Override
public Fields apply( Tap input )
{
return input.getSinkFields();
}
} );
}
内容来源于网络,如有侵权,请联系作者删除!