本文整理了Java中cascading.flow.Flow.stop()
方法的一些代码示例,展示了Flow.stop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.stop()
方法的具体详情如下:
包路径:cascading.flow.Flow
类名称:Flow
方法名:stop
[英]Method stop stops all running jobs, killing any currently executing.
[中]
代码示例来源:origin: LiveRamp/cascading_ext
@Override
public void stop() {
flow.stop();
}
}
代码示例来源:origin: cwensel/cascading
public void stop()
{
if( LOG.isInfoEnabled() )
logInfo( "stopping flow: " + flow.getName() );
stop = true;
if( flow != null )
flow.stop();
}
代码示例来源:origin: cascading/lingual-core
@Override
public void cancel() throws SQLException
{
try
{
if( !parent.isClosed() )
parent.cancel();
}
finally
{
Flow flow = lingualConnection.getCurrentFlow();
if( flow != null )
{
LOG.info( "stopping flow: {}", flow.getID() );
flow.stop();
}
}
}
代码示例来源:origin: cascading/cascading-hadoop2-common
flow.stop();
代码示例来源:origin: cwensel/cascading
flow.stop();
代码示例来源:origin: cwensel/cascading
flow.stop();
代码示例来源:origin: cascading/cascading-platform
@Test
public void testProcessFlowFlowListenerExceptionHandlingInStop() throws IOException, InterruptedException
{
ThrowableListener listener = new ThrowableListener();
getPlatform().copyFromLocal( inputFileIps );
String path = "stopException";
Flow process = flowWithException( path, FailingRiffle.Failing.STOP );
process.addListener( listener );
process.start();
try
{
process.stop();
fail( "there should have been an exception" );
}
catch( CascadingException exception )
{
assertNotNull( listener.getThrowable() );
}
}
代码示例来源:origin: cwensel/cascading
@Test
public void testProcessFlowFlowListenerExceptionHandlingInStop() throws IOException, InterruptedException
{
ThrowableListener listener = new ThrowableListener();
getPlatform().copyFromLocal( inputFileIps );
String path = "stopException";
Flow process = flowWithException( path, FailingRiffle.Failing.STOP );
process.addListener( listener );
process.start();
try
{
process.stop();
fail( "there should have been an exception" );
}
catch( CascadingException exception )
{
assertNotNull( listener.getThrowable() );
}
}
代码示例来源:origin: cwensel/cascading
flow.stop();
代码示例来源:origin: cascading/cascading-hadoop2-common
flow.stop();
代码示例来源:origin: cwensel/cascading
@Test
public void testStartStopRace() throws Exception
{
getPlatform().copyFromLocal( inputFileLower );
Tap sourceLower = new Hfs( new TextLine( new Fields( "offset", "line" ) ), inputFileLower );
Map sources = new HashMap();
sources.put( "lower", sourceLower );
Function splitter = new RegexSplitter( new Fields( "num", "char" ), " " );
// using null pos so all fields are written
Tap sink = new Hfs( new TextLine(), getOutputPath( "startstop" ), SinkMode.REPLACE );
Pipe pipeLower = new Each( new Pipe( "lower" ), new Fields( "line" ), splitter );
pipeLower = new GroupBy( pipeLower, new Fields( "num" ) );
Flow flow = getPlatform().getFlowConnector( getProperties() ).connect( sources, sink, pipeLower );
flow.start();
flow.stop(); // should not fail
}
代码示例来源:origin: cascading/cascading-hadoop2-common
@Test
public void testStartStopRace() throws Exception
{
getPlatform().copyFromLocal( inputFileLower );
Tap sourceLower = new Hfs( new TextLine( new Fields( "offset", "line" ) ), inputFileLower );
Map sources = new HashMap();
sources.put( "lower", sourceLower );
Function splitter = new RegexSplitter( new Fields( "num", "char" ), " " );
// using null pos so all fields are written
Tap sink = new Hfs( new TextLine(), getOutputPath( "startstop" ), SinkMode.REPLACE );
Pipe pipeLower = new Each( new Pipe( "lower" ), new Fields( "line" ), splitter );
pipeLower = new GroupBy( pipeLower, new Fields( "num" ) );
Flow flow = getPlatform().getFlowConnector( getProperties() ).connect( sources, sink, pipeLower );
flow.start();
flow.stop(); // should not fail
}
内容来源于网络,如有侵权,请联系作者删除!