|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TezTaskContext
Base interface for Context classes used to initialize the Input, Output and Processor instances.
| Method Summary | |
|---|---|
void |
fatalError(Throwable exception,
String message)
Report a fatal error to the framework. |
org.apache.hadoop.yarn.api.records.ApplicationId |
getApplicationId()
Get the ApplicationId for the running app |
TezCounters |
getCounters()
|
int |
getDAGAttemptNumber()
Get the current DAG Attempt Number |
String |
getDAGName()
Get the name of the DAG |
ByteBuffer |
getServiceConsumerMetaData(String serviceName)
Returns meta-data for the specified service. |
ByteBuffer |
getServiceProviderMetaData(String serviceName)
Return Provider meta-data for the specified service As an example, when the MR ShuffleHandler is used - this would return the shuffle port serialized as bytes |
int |
getTaskAttemptNumber()
Get the current Task Attempt Number |
int |
getTaskIndex()
Get the index of this Task among the tasks of this vertex |
int |
getTaskVertexIndex()
Get the index of this task's vertex in the set of vertices in the DAG. |
String |
getTaskVertexName()
Get the name of the Vertex in which the task is running |
long |
getTotalMemoryAvailableToTask()
Gets the total memory available to all components of the running task. |
String |
getUniqueIdentifier()
Returns an identifier which is unique to the specific Input, Processor or Output |
byte[] |
getUserPayload()
Get the User Payload for the Input/Output/Processor |
String[] |
getWorkDirs()
Get the work diectories for the Input/Output/Processor |
void |
requestInitialMemory(long size,
MemoryUpdateCallback callbackHandler)
Request a specific amount of memory during initialization (initialize(..*Context)) The requester is notified of allocation via the provided callback handler. |
void |
sendEvents(List<Event> events)
Send Events to the AM and/or dependent Vertices |
| Method Detail |
|---|
org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
ApplicationId for the running app
ApplicationIdint getDAGAttemptNumber()
int getTaskIndex()
int getTaskAttemptNumber()
String getDAGName()
String getTaskVertexName()
int getTaskVertexIndex()
TezCounters getCounters()
void sendEvents(List<Event> events)
events - Events to be sentbyte[] getUserPayload()
String[] getWorkDirs()
String getUniqueIdentifier()
void fatalError(Throwable exception,
String message)
exception - an exception representing the errorByteBuffer getServiceConsumerMetaData(String serviceName)
serviceName - the name of the service for which meta-data is required
ByteBuffer getServiceProviderMetaData(String serviceName)
serviceName - the name of the service for which provider meta-data is required
void requestInitialMemory(long size,
MemoryUpdateCallback callbackHandler)
size - request size in bytes.callbackHandler - the callback handler to be invoked once memory is assignedlong getTotalMemoryAvailableToTask()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||