本文整理了Java中cascading.util.Util.safeSleep()
方法的一些代码示例,展示了Util.safeSleep()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.safeSleep()
方法的具体详情如下:
包路径:cascading.util.Util
类名称:Util
方法名:safeSleep
暂无
代码示例来源:origin: cwensel/cascading
protected void sleepForPollingInterval()
{
Util.safeSleep( pollingInterval );
}
代码示例来源:origin: cwensel/cascading
Util.safeSleep( 500 );
timeout++;
代码示例来源:origin: cwensel/cascading
Util.safeSleep( 10 );
代码示例来源:origin: cascading/cascading-hadoop2-common
flow.start();
Util.safeSleep( 5000 );
代码示例来源:origin: cwensel/cascading
@Test
public void testFlowLazy() throws IOException
{
getPlatform().copyFromLocal( inputFileApache );
String outputPath1 = getOutputPath( "flowTest1" );
String outputPath2 = getOutputPath( "flowTest2" );
String outputPath3 = getOutputPath( "flowTest3" );
remove( outputPath1, true );
remove( outputPath2, true );
remove( outputPath3, true );
JobConf defaultConf = (JobConf) ( (BaseHadoopPlatform) getPlatform() ).getConfiguration();
JobConf conf1 = createJob( defaultConf, "mr1", InputData.inputFileApache, outputPath1 );
JobConf conf2 = createJob( defaultConf, "mr2", outputPath1, outputPath2 );
JobConf conf3 = createJob( defaultConf, "mr3", outputPath2, outputPath3 );
validateLength( new Hfs( new TextLine(), InputData.inputFileApache ).openForRead( new HadoopFlowProcess( defaultConf ) ), 10 );
MultiMapReduceFlow flow = new MultiMapReduceFlow( "mrflow", conf1 );
flow.start();
Util.safeSleep( 3000 );
flow.attachFlowStep( conf2 );
Util.safeSleep( 3000 );
flow.attachFlowStep( conf3 );
flow.complete();
validateLength( new Hfs( new TextLine(), outputPath1 ).openForRead( new HadoopFlowProcess( defaultConf ) ), 10 );
Collection<Tap> sinks = flow.getSinks().values();
assertEquals( 1, sinks.size() );
String identifier = sinks.iterator().next().getIdentifier();
assertEquals( "flowTest3", identifier.substring( identifier.lastIndexOf( '/' ) + 1 ) );
}
代码示例来源:origin: cwensel/cascading
flow.start();
Util.safeSleep( 5000 );
代码示例来源:origin: cascading/cascading-hadoop2-mr1
@Test
public void testFlowLazy() throws IOException
{
getPlatform().copyFromLocal( inputFileApache );
String outputPath1 = getOutputPath( "flowTest1" );
String outputPath2 = getOutputPath( "flowTest2" );
String outputPath3 = getOutputPath( "flowTest3" );
remove( outputPath1, true );
remove( outputPath2, true );
remove( outputPath3, true );
JobConf defaultConf = (JobConf) ( (BaseHadoopPlatform) getPlatform() ).getConfiguration();
JobConf conf1 = createJob( defaultConf, "mr1", InputData.inputFileApache, outputPath1 );
JobConf conf2 = createJob( defaultConf, "mr2", outputPath1, outputPath2 );
JobConf conf3 = createJob( defaultConf, "mr3", outputPath2, outputPath3 );
validateLength( new Hfs( new TextLine(), InputData.inputFileApache ).openForRead( new HadoopFlowProcess( defaultConf ) ), 10 );
MultiMapReduceFlow flow = new MultiMapReduceFlow( "mrflow", conf1 );
flow.start();
Util.safeSleep( 3000 );
flow.attachFlowStep( conf2 );
Util.safeSleep( 3000 );
flow.attachFlowStep( conf3 );
flow.complete();
validateLength( new Hfs( new TextLine(), outputPath1 ).openForRead( new HadoopFlowProcess( defaultConf ) ), 10 );
Collection<Tap> sinks = flow.getSinks().values();
assertEquals( 1, sinks.size() );
String identifier = sinks.iterator().next().getIdentifier();
assertEquals( "flowTest3", identifier.substring( identifier.lastIndexOf( '/' ) + 1 ) );
}
代码示例来源:origin: cwensel/cascading
Util.safeSleep( 1000 ); // be safe, delay execution
代码示例来源:origin: cascading/cascading-platform
Util.safeSleep( 1000 ); // be safe, delay execution
内容来源于网络,如有侵权,请联系作者删除!