cascading.util.Util.safeSleep()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(164)

本文整理了Java中cascading.util.Util.safeSleep()方法的一些代码示例,展示了Util.safeSleep()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.safeSleep()方法的具体详情如下:
包路径:cascading.util.Util
类名称:Util
方法名:safeSleep

Util.safeSleep介绍

暂无

代码示例

代码示例来源:origin: cwensel/cascading

  1. protected void sleepForPollingInterval()
  2. {
  3. Util.safeSleep( pollingInterval );
  4. }

代码示例来源:origin: cwensel/cascading

  1. Util.safeSleep( 500 );
  2. timeout++;

代码示例来源:origin: cwensel/cascading

  1. Util.safeSleep( 10 );

代码示例来源:origin: cascading/cascading-hadoop2-common

  1. flow.start();
  2. Util.safeSleep( 5000 );

代码示例来源:origin: cwensel/cascading

  1. @Test
  2. public void testFlowLazy() throws IOException
  3. {
  4. getPlatform().copyFromLocal( inputFileApache );
  5. String outputPath1 = getOutputPath( "flowTest1" );
  6. String outputPath2 = getOutputPath( "flowTest2" );
  7. String outputPath3 = getOutputPath( "flowTest3" );
  8. remove( outputPath1, true );
  9. remove( outputPath2, true );
  10. remove( outputPath3, true );
  11. JobConf defaultConf = (JobConf) ( (BaseHadoopPlatform) getPlatform() ).getConfiguration();
  12. JobConf conf1 = createJob( defaultConf, "mr1", InputData.inputFileApache, outputPath1 );
  13. JobConf conf2 = createJob( defaultConf, "mr2", outputPath1, outputPath2 );
  14. JobConf conf3 = createJob( defaultConf, "mr3", outputPath2, outputPath3 );
  15. validateLength( new Hfs( new TextLine(), InputData.inputFileApache ).openForRead( new HadoopFlowProcess( defaultConf ) ), 10 );
  16. MultiMapReduceFlow flow = new MultiMapReduceFlow( "mrflow", conf1 );
  17. flow.start();
  18. Util.safeSleep( 3000 );
  19. flow.attachFlowStep( conf2 );
  20. Util.safeSleep( 3000 );
  21. flow.attachFlowStep( conf3 );
  22. flow.complete();
  23. validateLength( new Hfs( new TextLine(), outputPath1 ).openForRead( new HadoopFlowProcess( defaultConf ) ), 10 );
  24. Collection<Tap> sinks = flow.getSinks().values();
  25. assertEquals( 1, sinks.size() );
  26. String identifier = sinks.iterator().next().getIdentifier();
  27. assertEquals( "flowTest3", identifier.substring( identifier.lastIndexOf( '/' ) + 1 ) );
  28. }

代码示例来源:origin: cwensel/cascading

  1. flow.start();
  2. Util.safeSleep( 5000 );

代码示例来源:origin: cascading/cascading-hadoop2-mr1

  1. @Test
  2. public void testFlowLazy() throws IOException
  3. {
  4. getPlatform().copyFromLocal( inputFileApache );
  5. String outputPath1 = getOutputPath( "flowTest1" );
  6. String outputPath2 = getOutputPath( "flowTest2" );
  7. String outputPath3 = getOutputPath( "flowTest3" );
  8. remove( outputPath1, true );
  9. remove( outputPath2, true );
  10. remove( outputPath3, true );
  11. JobConf defaultConf = (JobConf) ( (BaseHadoopPlatform) getPlatform() ).getConfiguration();
  12. JobConf conf1 = createJob( defaultConf, "mr1", InputData.inputFileApache, outputPath1 );
  13. JobConf conf2 = createJob( defaultConf, "mr2", outputPath1, outputPath2 );
  14. JobConf conf3 = createJob( defaultConf, "mr3", outputPath2, outputPath3 );
  15. validateLength( new Hfs( new TextLine(), InputData.inputFileApache ).openForRead( new HadoopFlowProcess( defaultConf ) ), 10 );
  16. MultiMapReduceFlow flow = new MultiMapReduceFlow( "mrflow", conf1 );
  17. flow.start();
  18. Util.safeSleep( 3000 );
  19. flow.attachFlowStep( conf2 );
  20. Util.safeSleep( 3000 );
  21. flow.attachFlowStep( conf3 );
  22. flow.complete();
  23. validateLength( new Hfs( new TextLine(), outputPath1 ).openForRead( new HadoopFlowProcess( defaultConf ) ), 10 );
  24. Collection<Tap> sinks = flow.getSinks().values();
  25. assertEquals( 1, sinks.size() );
  26. String identifier = sinks.iterator().next().getIdentifier();
  27. assertEquals( "flowTest3", identifier.substring( identifier.lastIndexOf( '/' ) + 1 ) );
  28. }

代码示例来源:origin: cwensel/cascading

  1. Util.safeSleep( 1000 ); // be safe, delay execution

代码示例来源:origin: cascading/cascading-platform

  1. Util.safeSleep( 1000 ); // be safe, delay execution

相关文章