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)
INodeInstanceprepare in interface INodeInstancecfg - configurationpublic boolean execute()
execute in interface INodeInstancepublic boolean sync(java.lang.String edge,
byte[] value)
ISyncpublic int getId()
INodeInstancegetId in interface INodeInstancepublic int getIndex()
getIndex in interface INodeInstancepublic INode getNode()
INodeInstancegetNode in interface INodeInstancepublic void reset()
INodeInstancereset in interface INodeInstancepublic void close()
INodeInstanceclose in interface INodeInstancepublic boolean progressCommunication()
public boolean isComplete()
INodeInstanceisComplete in interface INodeInstancepublic void registerOutParallelOperation(java.lang.String edge,
IParallelOperation op)
public int getWorkerId()