cascading.flow.local
Class LocalFlow

java.lang.Object
  extended by cascading.flow.BaseFlow<Properties>
      extended by cascading.flow.local.LocalFlow
All Implemented Interfaces:
Flow<Properties>, UnitOfWork<FlowStats>

public class LocalFlow
extends BaseFlow<Properties>

Class LocalFlow is the local mode specific implementation of a Flow.

LocalFlow must be created through a LocalFlowConnector instance.

If classpath paths are provided on the FlowDef, the context classloader used to internally urn the current Flow will be swapped out with an URLClassLoader pointing to each element.

See Also:
LocalFlowConnector

Nested Class Summary
 
Nested classes/interfaces inherited from class cascading.flow.BaseFlow
BaseFlow.FlowHolder
 
Field Summary
 
Fields inherited from class cascading.flow.BaseFlow
flowStats, shutdownHook, sinks, sources, stop, stopJobsOnExit, thread
 
Fields inherited from interface cascading.flow.Flow
CASCADING_FLOW_ID
 
Constructor Summary
LocalFlow(cascading.flow.planner.PlatformInfo platformInfo, Map<Object,Object> properties, Properties config, FlowDef flowDef)
           
 
Method Summary
protected  Thread createFlowThread(String threadName)
           
 Properties getConfig()
          Method getConfig returns the internal configuration object.
 Map<Object,Object> getConfigAsProperties()
          Method getConfiAsProperties converts the internal configuration object into a Map of key value pairs.
 Properties getConfigCopy()
          Method getConfigCopy returns a copy of the internal configuration object.
 FlowProcess<Properties> getFlowProcess()
           
protected  int getMaxNumParallelSteps()
           
 String getProperty(String key)
           
protected  void initConfig(Map<Object,Object> properties, Properties parentConfig)
          This method creates a new internal Config with the parentConfig as defaults using the properties to override the defaults.
protected  void internalClean(boolean stop)
           
protected  void internalShutdown()
           
protected  void internalStart()
           
protected  Properties newConfig(Properties defaultConfig)
           
protected  void setConfigProperty(Properties properties, Object key, Object value)
           
 boolean stepsAreLocal()
          Method jobsAreLocal returns true if all jobs are executed in-process as a single map and reduce task.
 
Methods inherited from class cascading.flow.BaseFlow
addListener, areSinksStale, areSourcesNewer, cleanup, complete, createConfig, deleteCheckpointsIfNotUpdate, deleteCheckpointsIfReplace, deleteSinks, deleteSinksIfNotUpdate, deleteSinksIfReplace, deleteTrapsIfNotUpdate, deleteTrapsIfReplace, fireOnCompleted, fireOnStarting, fireOnStopping, fireOnThrowable, getCascadeID, getCascadingServices, getCheckpointNames, getCheckpoints, getCheckpointsCollection, getClassPath, getFieldsFor, getFlowSession, getFlowSkipStrategy, getFlowStats, getFlowSteps, getFlowStepStrategy, getHolder, getID, getName, getPlatformInfo, getRunID, getSink, getSink, getSinkModified, getSinkNames, getSinks, getSinksCollection, getSource, getSourceNames, getSources, getSourcesCollection, getSpawnStrategy, getStats, getSubmitPriority, getTags, getTrapNames, getTraps, getTrapsCollection, handleExecutorShutdown, hasListeners, initFromProperties, initialize, initializeNewJobsMap, initSteps, internalStopAllJobs, isSkipFlow, isStopJobsOnExit, logInfo, openSink, openSink, openSource, openSource, openTapForRead, openTapForWrite, openTrap, openTrap, prepare, presentSinkFields, presentSourceFields, registerShutdownHook, removeListener, resourceExists, retrieveSinkFields, retrieveSourceFields, setCascade, setCheckpoints, setFlowSkipStrategy, setFlowStepGraph, setFlowStepStrategy, setName, setSinks, setSources, setSpawnStrategy, setSubmitPriority, setTraps, start, stop, toString, updateSchemes, writeDOT, writeStepsDOT
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalFlow

public LocalFlow(cascading.flow.planner.PlatformInfo platformInfo,
                 Map<Object,Object> properties,
                 Properties config,
                 FlowDef flowDef)
Method Detail

initConfig

protected void initConfig(Map<Object,Object> properties,
                          Properties parentConfig)
Description copied from class: BaseFlow
This method creates a new internal Config with the parentConfig as defaults using the properties to override the defaults.

Specified by:
initConfig in class BaseFlow<Properties>
Parameters:
properties - of type Map
parentConfig - of type Config

setConfigProperty

protected void setConfigProperty(Properties properties,
                                 Object key,
                                 Object value)
Specified by:
setConfigProperty in class BaseFlow<Properties>

newConfig

protected Properties newConfig(Properties defaultConfig)
Specified by:
newConfig in class BaseFlow<Properties>

getConfig

public Properties getConfig()
Description copied from interface: Flow
Method getConfig returns the internal configuration object.

Any changes to this object will not be reflected in child steps. See FlowConnector for setting default properties visible to children. Or see FlowStepStrategy for setting properties on individual steps before they are executed.

Returns:
the default configuration of this Flow

getConfigCopy

public Properties getConfigCopy()
Description copied from interface: Flow
Method getConfigCopy returns a copy of the internal configuration object. This object can be safely modified.

Returns:
a copy of the default configuration of this Flow

getConfigAsProperties

public Map<Object,Object> getConfigAsProperties()
Description copied from interface: Flow
Method getConfiAsProperties converts the internal configuration object into a Map of key value pairs.

Returns:
a Map of key/value pairs

getProperty

public String getProperty(String key)

getFlowProcess

public FlowProcess<Properties> getFlowProcess()

internalStart

protected void internalStart()
Specified by:
internalStart in class BaseFlow<Properties>

createFlowThread

protected Thread createFlowThread(String threadName)
Overrides:
createFlowThread in class BaseFlow<Properties>

internalClean

protected void internalClean(boolean stop)
Specified by:
internalClean in class BaseFlow<Properties>

stepsAreLocal

public boolean stepsAreLocal()
Description copied from interface: Flow
Method jobsAreLocal returns true if all jobs are executed in-process as a single map and reduce task.

Returns:
boolean

getMaxNumParallelSteps

protected int getMaxNumParallelSteps()
Specified by:
getMaxNumParallelSteps in class BaseFlow<Properties>

internalShutdown

protected void internalShutdown()
Specified by:
internalShutdown in class BaseFlow<Properties>


Copyright © 2007-2013 Concurrent, Inc. All Rights Reserved.