@InterfaceAudience.Private public final class AMRMClientUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
APP_ALREADY_REGISTERED_MESSAGE |
static String |
EXPECTED_HB_RESPONSEID_MESSAGE |
static int |
PRE_REGISTER_RESPONSE_ID |
static String |
RECEIVED_HB_RESPONSEID_MESSAGE |
| Modifier and Type | Method and Description |
|---|---|
static void |
addToOutstandingSchedulingRequests(Collection<org.apache.hadoop.yarn.api.records.SchedulingRequest> requests,
Map<Set<String>,List<org.apache.hadoop.yarn.api.records.SchedulingRequest>> outstandingSchedRequests) |
static String |
assembleInvalidResponseIdExceptionMessage(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
int expected,
int received)
Generate the exception message when RM receives an AM heartbeat with
invalid responseId.
|
static <T> T |
createRMProxy(org.apache.hadoop.conf.Configuration configuration,
Class<T> protocol,
org.apache.hadoop.security.UserGroupInformation user,
org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token)
Create a proxy for the specified protocol.
|
static int |
getNextResponseId(int responseId) |
static boolean |
isMatchingSchedulingRequests(org.apache.hadoop.yarn.api.records.SchedulingRequest schedReq1,
org.apache.hadoop.yarn.api.records.SchedulingRequest schedReq2) |
static int |
parseExpectedResponseIdFromException(String exceptionMessage)
Parse the expected responseId from the exception generated by RM when
processing AM heartbeat.
|
static void |
removeFromOutstandingSchedulingRequests(Collection<org.apache.hadoop.yarn.api.records.Container> containers,
Map<Set<String>,List<org.apache.hadoop.yarn.api.records.SchedulingRequest>> outstandingSchedRequests) |
public static final int PRE_REGISTER_RESPONSE_ID
public static final String APP_ALREADY_REGISTERED_MESSAGE
public static final String EXPECTED_HB_RESPONSEID_MESSAGE
public static final String RECEIVED_HB_RESPONSEID_MESSAGE
@InterfaceAudience.Public
@InterfaceStability.Unstable
public static <T> T createRMProxy(org.apache.hadoop.conf.Configuration configuration,
Class<T> protocol,
org.apache.hadoop.security.UserGroupInformation user,
org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token)
throws IOException
T - Type information of the proxyconfiguration - Configuration to generate ClientRMProxyprotocol - Protocol for the proxyuser - the user on whose behalf the proxy is being createdtoken - the auth token to use for connectionIOException - on failurepublic static String assembleInvalidResponseIdExceptionMessage(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, int expected, int received)
appAttemptId - the app attemptexpected - the expected responseId valuereceived - the received responseId valuepublic static int parseExpectedResponseIdFromException(String exceptionMessage)
exceptionMessage - the exception message thrown by RMpublic static int getNextResponseId(int responseId)
public static void addToOutstandingSchedulingRequests(Collection<org.apache.hadoop.yarn.api.records.SchedulingRequest> requests, Map<Set<String>,List<org.apache.hadoop.yarn.api.records.SchedulingRequest>> outstandingSchedRequests)
public static boolean isMatchingSchedulingRequests(org.apache.hadoop.yarn.api.records.SchedulingRequest schedReq1,
org.apache.hadoop.yarn.api.records.SchedulingRequest schedReq2)
public static void removeFromOutstandingSchedulingRequests(Collection<org.apache.hadoop.yarn.api.records.Container> containers, Map<Set<String>,List<org.apache.hadoop.yarn.api.records.SchedulingRequest>> outstandingSchedRequests)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.