java.lang.Runnablepublic class AMHeartbeatRequestHandler
extends java.lang.Thread
| Modifier and Type | Class | Description |
|---|---|---|
static class |
AMHeartbeatRequestHandler.AsyncAllocateRequestInfo |
Data structure that encapsulates AllocateRequest and AsyncCallback
instance.
|
class |
AMHeartbeatRequestHandler.HeartBeatThreadUncaughtExceptionHandler |
Uncaught exception handler for the background heartbeat thread.
|
| Modifier and Type | Field | Description |
|---|---|---|
static org.slf4j.Logger |
LOG |
| Constructor | Description |
|---|---|
AMHeartbeatRequestHandler(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
AMRMClientRelayer rmProxyRelayer) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
allocateAsync(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest request,
org.apache.hadoop.yarn.util.AsyncCallback<org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse> callback) |
Sends the specified heart beat request to the resource manager and invokes
the callback asynchronously with the response.
|
void |
drainHeartbeatThread() |
|
int |
getRequestQueueSize() |
|
void |
resetLastResponseId() |
Reset the lastResponseId to zero.
|
void |
run() |
|
void |
setUGI(org.apache.hadoop.security.UserGroupInformation ugi) |
Set the UGI for RM connection.
|
void |
shutdown() |
Shutdown the thread.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yieldpublic AMHeartbeatRequestHandler(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
AMRMClientRelayer rmProxyRelayer)
public void shutdown()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void resetLastResponseId()
public void setUGI(org.apache.hadoop.security.UserGroupInformation ugi)
ugi - UserGroupInformation.public void allocateAsync(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest request,
org.apache.hadoop.yarn.util.AsyncCallback<org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse> callback)
throws org.apache.hadoop.yarn.exceptions.YarnException
request - the allocate requestcallback - the callback method for the requestorg.apache.hadoop.yarn.exceptions.YarnException - if registerAM is not called yet@VisibleForTesting public void drainHeartbeatThread()
@VisibleForTesting public int getRequestQueueSize()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.