本文整理了Java中cascading.flow.Flow.getCheckpoints()
方法的一些代码示例,展示了Flow.getCheckpoints()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.getCheckpoints()
方法的具体详情如下:
包路径:cascading.flow.Flow
类名称:Flow
方法名:getCheckpoints
[英]Method getCheckpoints returns the checkpoint taps of this Flow object.
[中]方法getCheckpoints返回此流对象的检查点点击。
代码示例来源:origin: cwensel/cascading
@Test
public void testCheckpointTapCascade() throws IOException
{
if( !getPlatform().isMapReduce() )
return;
getPlatform().copyFromLocal( inputFileIps );
String path = "checkpoint";
Flow first = firstFlow( path + "/first", false );
Flow second = secondFlow( first.getSink(), path + "/second" );
Flow third = thirdCheckpointFlow( second.getSink(), path + "/third" );
Flow fourth = fourthFlow( (Tap) third.getCheckpoints().values().iterator().next(), path + "/fourth" );
Cascade cascade = new CascadeConnector( getProperties() ).connect( fourth, second, third, first );
cascade.start();
cascade.complete();
validateLength( fourth, 20 );
assertTrue( cascade.getHeadFlows().contains( first ) );
assertTrue( cascade.getSourceTaps().containsAll( first.getSourcesCollection() ) );
assertTrue( cascade.getIntermediateTaps().containsAll( third.getCheckpointsCollection() ) );
assertTrue( cascade.getCheckpointsTaps().containsAll( third.getCheckpointsCollection() ) );
assertTrue( cascade.getTailFlows().contains( fourth ) );
assertTrue( cascade.getSinkTaps().containsAll( fourth.getSinksCollection() ) );
}
代码示例来源:origin: cascading/cascading-platform
@Test
public void testCheckpointTapCascade() throws IOException
{
if( !getPlatform().isMapReduce() )
return;
getPlatform().copyFromLocal( inputFileIps );
String path = "checkpoint";
Flow first = firstFlow( path + "/first", false );
Flow second = secondFlow( first.getSink(), path + "/second" );
Flow third = thirdCheckpointFlow( second.getSink(), path + "/third" );
Flow fourth = fourthFlow( (Tap) third.getCheckpoints().values().iterator().next(), path + "/fourth" );
Cascade cascade = new CascadeConnector( getProperties() ).connect( fourth, second, third, first );
cascade.start();
cascade.complete();
validateLength( fourth, 20 );
assertTrue( cascade.getHeadFlows().contains( first ) );
assertTrue( cascade.getSourceTaps().containsAll( first.getSourcesCollection() ) );
assertTrue( cascade.getIntermediateTaps().containsAll( third.getCheckpointsCollection() ) );
assertTrue( cascade.getCheckpointsTaps().containsAll( third.getCheckpointsCollection() ) );
assertTrue( cascade.getTailFlows().contains( fourth ) );
assertTrue( cascade.getSinkTaps().containsAll( fourth.getSinksCollection() ) );
}
内容来源于网络,如有侵权,请联系作者删除!