@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 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 int | parseExpectedResponseIdFromException(String exceptionMessage)Parse the expected responseId from the exception generated by RM when
 processing AM heartbeat. | 
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)
Copyright © 2022 Apache Software Foundation. All rights reserved.