congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
LockingFlowListener
Code IndexAdd Tabnine to your IDE (free)

How to use
LockingFlowListener
in
cascading.flow

Best Java code snippets using cascading.flow.LockingFlowListener (Showing top 14 results out of 315)

origin: cwensel/cascading

public void onCompleted( Flow flow )
 {
 super.onCompleted( flow );
 if( onFail == OnFail.COMPLETED )
  throw new RuntimeException( "intentionally failed on: " + onFail );
 }
origin: cwensel/cascading

public void onStarting( Flow flow )
 {
 super.onStarting( flow );
 if( onFail == OnFail.STARTING )
  throw new RuntimeException( "intentionally failed on: " + onFail );
 }
origin: cwensel/cascading

public void onStopping( Flow flow )
 {
 super.onStopping( flow );
 if( onFail == OnFail.STOPPING )
  throw new RuntimeException( "intentionally failed on: " + onFail );
 }
origin: cascading/cascading-platform

Flow fourth = fourthFlow( third.getSink(), path + "/fourth" );
LockingFlowListener firstFlowListener = new LockingFlowListener();
LockingFlowListener secondFlowListener = new LockingFlowListener();
LockingFlowListener thirdFlowListener = new LockingFlowListener();
LockingFlowListener fourthFlowListener = new LockingFlowListener();
origin: cwensel/cascading

public boolean onThrowable( Flow flow, Throwable throwable )
 {
 super.onThrowable( flow, throwable );
 if( onFail == OnFail.THROWABLE )
  throw new RuntimeException( "intentionally failed on: " + onFail );
 return false;
 }
}
origin: cwensel/cascading

Flow fourth = fourthFlow( third.getSink(), path + "/fourth" );
LockingFlowListener firstFlowListener = new LockingFlowListener();
LockingFlowListener secondFlowListener = new LockingFlowListener();
LockingFlowListener thirdFlowListener = new LockingFlowListener();
LockingFlowListener fourthFlowListener = new LockingFlowListener();
origin: cascading/cascading-platform

LockingFlowListener flowListener = new LockingFlowListener();
origin: cwensel/cascading

LockingFlowListener flowListener = new LockingFlowListener();
origin: cwensel/cascading

final LockingFlowListener listener = new LockingFlowListener();
origin: cascading/cascading-hadoop2-common

final LockingFlowListener listener = new LockingFlowListener();
origin: cwensel/cascading

@Test
public void testSimpleRiffleCascade() throws IOException, InterruptedException
 {
 getPlatform().copyFromLocal( inputFileIps );
 String path = "perpetualcascade";
 Flow first = firstFlow( path );
 Flow second = secondFlow( first.getSink(), path );
 Flow third = thirdFlow( second.getSink(), path );
 Flow fourth = fourthFlow( third.getSink(), path );
 ProcessFlow firstProcess = new ProcessFlow( "first", first );
 ProcessFlow secondProcess = new ProcessFlow( "second", second );
 ProcessFlow thirdProcess = new ProcessFlow( "third", third );
 ProcessFlow fourthProcess = new ProcessFlow( "fourth", fourth );
 LockingFlowListener flowListener = new LockingFlowListener();
 secondProcess.addListener( flowListener );
 Cascade cascade = new CascadeConnector( getProperties() ).connect( fourthProcess, secondProcess, firstProcess, thirdProcess );
 cascade.start();
 cascade.complete();
 assertTrue( "did not start", flowListener.started.tryAcquire( 2, TimeUnit.SECONDS ) );
 assertTrue( "did not complete", flowListener.completed.tryAcquire( 2, TimeUnit.SECONDS ) );
 validateLength( fourth, 20 );
 }
origin: cascading/cascading-platform

@Test
public void testSimpleRiffleCascade() throws IOException, InterruptedException
 {
 getPlatform().copyFromLocal( inputFileIps );
 String path = "perpetualcascade";
 Flow first = firstFlow( path );
 Flow second = secondFlow( first.getSink(), path );
 Flow third = thirdFlow( second.getSink(), path );
 Flow fourth = fourthFlow( third.getSink(), path );
 ProcessFlow firstProcess = new ProcessFlow( "first", first );
 ProcessFlow secondProcess = new ProcessFlow( "second", second );
 ProcessFlow thirdProcess = new ProcessFlow( "third", third );
 ProcessFlow fourthProcess = new ProcessFlow( "fourth", fourth );
 LockingFlowListener flowListener = new LockingFlowListener();
 secondProcess.addListener( flowListener );
 Cascade cascade = new CascadeConnector( getProperties() ).connect( fourthProcess, secondProcess, firstProcess, thirdProcess );
 cascade.start();
 cascade.complete();
 assertTrue( "did not start", flowListener.started.tryAcquire( 2, TimeUnit.SECONDS ) );
 assertTrue( "did not complete", flowListener.completed.tryAcquire( 2, TimeUnit.SECONDS ) );
 validateLength( fourth, 20 );
 }
origin: cwensel/cascading

@Test
public void testStartWithoutComplete() 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( "withoutcomplete" ), 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 );
 LockingFlowListener listener = new LockingFlowListener();
 flow.addListener( listener );
 flow.start();
 assertTrue( listener.completed.tryAcquire( 90, TimeUnit.SECONDS ) );
 }
origin: cascading/cascading-hadoop2-common

@Test
public void testStartWithoutComplete() 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( "withoutcomplete" ), 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 );
 LockingFlowListener listener = new LockingFlowListener();
 flow.addListener( listener );
 flow.start();
 assertTrue( listener.completed.tryAcquire( 90, TimeUnit.SECONDS ) );
 }
cascading.flowLockingFlowListener

Most used methods

  • <init>
  • onCompleted
  • onStarting
  • onStopping
  • onThrowable

Popular in Java

  • Updating database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now