public class SourceBatchInstance extends java.lang.Object implements INodeInstance, ISync
Constructor and Description |
---|
SourceBatchInstance(ISource task,
java.util.concurrent.BlockingQueue<IMessage> outQueue,
Config config,
java.lang.String tName,
int taskId,
int globalTaskId,
int tIndex,
int parallel,
int wId,
java.util.Map<java.lang.String,java.lang.Object> cfgs,
java.util.Map<java.lang.String,java.lang.String> outEdges,
TaskSchedulePlan taskSchedule,
CheckpointingClient checkpointingClient,
java.lang.String taskGraphName,
long tasksVersion) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Calls at the end to clean up
|
boolean |
execute()
Execution Method calls the SourceTasks run method to get context
|
int |
getId()
Get task id
|
int |
getIndex() |
INode |
getNode()
Get the node of this instance
|
int |
getWorkerId() |
boolean |
isComplete()
Progress the communication
|
void |
prepare(Config cfg)
Prepare for an execution
|
boolean |
progressCommunication()
Progress the communication and return weather we need to further progress
|
void |
registerOutParallelOperation(java.lang.String edge,
IParallelOperation op) |
void |
reset()
Lets reset the node instance for a new execution
|
boolean |
sync(java.lang.String edge,
byte[] value)
Callback for sync
|
public SourceBatchInstance(ISource task, java.util.concurrent.BlockingQueue<IMessage> outQueue, Config config, java.lang.String tName, int taskId, int globalTaskId, int tIndex, int parallel, int wId, java.util.Map<java.lang.String,java.lang.Object> cfgs, java.util.Map<java.lang.String,java.lang.String> outEdges, TaskSchedulePlan taskSchedule, CheckpointingClient checkpointingClient, java.lang.String taskGraphName, long tasksVersion)
public void prepare(Config cfg)
INodeInstance
prepare
in interface INodeInstance
cfg
- configurationpublic boolean execute()
execute
in interface INodeInstance
public boolean sync(java.lang.String edge, byte[] value)
ISync
public int getId()
INodeInstance
getId
in interface INodeInstance
public int getIndex()
getIndex
in interface INodeInstance
public INode getNode()
INodeInstance
getNode
in interface INodeInstance
public void reset()
INodeInstance
reset
in interface INodeInstance
public void close()
INodeInstance
close
in interface INodeInstance
public boolean progressCommunication()
public boolean isComplete()
INodeInstance
isComplete
in interface INodeInstance
public void registerOutParallelOperation(java.lang.String edge, IParallelOperation op)
public int getWorkerId()