@InterfaceAudience.Private @InterfaceStability.Unstable public final class RouterServerUtil extends Object
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Modifier and Type | Method and Description |
---|---|
static void |
checkAppSubmissionContext(org.apache.hadoop.yarn.api.records.impl.pb.ApplicationSubmissionContextPBImpl appContext,
org.apache.hadoop.conf.Configuration conf)
Checks if the ApplicationSubmissionContext submitted with the application
is valid.
|
static boolean |
checkPolicyManagerValid(String policyManager,
List<String> supportWeightList) |
static org.apache.hadoop.yarn.api.records.ReservationDefinition |
convertReservationDefinition(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ReservationDefinitionInfo definitionInfo)
Convert ReservationDefinitionInfo to ReservationDefinition.
|
static <R> R |
createRequestInterceptorChain(org.apache.hadoop.conf.Configuration conf,
String pipeLineClassName,
String interceptorClassName,
Class<R> clazz) |
static String |
getRenewerForToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier> token) |
static org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext |
getTrimmedAppSubmissionContext(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext actualContext)
Get trimmed version of ApplicationSubmissionContext to be saved to
Federation State Store.
|
static boolean |
isAllowedDelegationTokenOp() |
static boolean |
isRouterWebProxyEnable(org.apache.hadoop.conf.Configuration conf) |
static RuntimeException |
logAndReturnRunTimeException(String errMsgFormat,
Object... args)
Throws an RunTimeException due to an error.
|
static RuntimeException |
logAndReturnRunTimeException(Throwable t,
String errMsgFormat,
Object... args)
Throws an RunTimeException due to an error.
|
static org.apache.hadoop.yarn.exceptions.YarnRuntimeException |
logAndReturnYarnRunTimeException(Throwable t,
String errMsgFormat,
Object... args)
Throws an YarnRuntimeException due to an error.
|
static void |
logAndThrowException(String errMsg)
Throws an exception due to an error.
|
static void |
logAndThrowException(String errMsg,
Throwable t)
Throws an exception due to an error.
|
static void |
logAndThrowException(Throwable t,
String errMsgFormat,
Object... args)
Throws an exception due to an error.
|
static void |
logAndThrowIOException(String errMsg,
Throwable t)
Throws an IOException due to an error.
|
static void |
logAndThrowIOException(Throwable t,
String errMsgFormat,
Object... args)
Throws an IOException due to an error.
|
static void |
logAndThrowRunTimeException(String errMsg,
Throwable t)
Throws an RunTimeException due to an error.
|
static void |
logAndThrowRunTimeException(Throwable t,
String errMsgFormat,
Object... args)
Throws an RunTimeException due to an error.
|
static org.apache.hadoop.security.UserGroupInformation |
setupUser(String userName)
Set User information.
|
static void |
validateApplicationAttemptId(String appAttemptId)
Check appAttemptId is accurate.
|
static void |
validateApplicationId(String applicationId)
Check applicationId is accurate.
|
static void |
validateContainerId(String containerId)
Check containerId is accurate.
|
static void |
validateReservationId(String reservationId)
Check reservationId is accurate.
|
@InterfaceAudience.Public @InterfaceStability.Unstable public static void logAndThrowException(Throwable t, String errMsgFormat, Object... args) throws org.apache.hadoop.yarn.exceptions.YarnException
t
- the throwable raised in the called class.errMsgFormat
- the error message format string.args
- referenced by the format specifiers in the format string.org.apache.hadoop.yarn.exceptions.YarnException
- on failure@InterfaceAudience.Public @InterfaceStability.Unstable public static void logAndThrowException(String errMsg, Throwable t) throws org.apache.hadoop.yarn.exceptions.YarnException
errMsg
- the error messaget
- the throwable raised in the called class.org.apache.hadoop.yarn.exceptions.YarnException
- on failure@InterfaceAudience.Public @InterfaceStability.Unstable public static void logAndThrowException(String errMsg) throws org.apache.hadoop.yarn.exceptions.YarnException
errMsg
- the error messageorg.apache.hadoop.yarn.exceptions.YarnException
- on failurepublic static <R> R createRequestInterceptorChain(org.apache.hadoop.conf.Configuration conf, String pipeLineClassName, String interceptorClassName, Class<R> clazz)
@InterfaceAudience.Public @InterfaceStability.Unstable public static void logAndThrowIOException(String errMsg, Throwable t) throws IOException
errMsg
- the error messaget
- the throwable raised in the called class.IOException
- on failure@InterfaceAudience.Public @InterfaceStability.Unstable public static void logAndThrowIOException(Throwable t, String errMsgFormat, Object... args) throws IOException
t
- the throwable raised in the called class.errMsgFormat
- the error message format string.args
- referenced by the format specifiers in the format string.IOException
- on failure@InterfaceAudience.Public @InterfaceStability.Unstable public static void logAndThrowRunTimeException(String errMsg, Throwable t) throws RuntimeException
errMsg
- the error messaget
- the throwable raised in the called class.RuntimeException
- on failure@InterfaceAudience.Public @InterfaceStability.Unstable public static void logAndThrowRunTimeException(Throwable t, String errMsgFormat, Object... args) throws RuntimeException
t
- the throwable raised in the called class.errMsgFormat
- the error message format string.args
- referenced by the format specifiers in the format string.RuntimeException
- on failure@InterfaceAudience.Public @InterfaceStability.Unstable public static RuntimeException logAndReturnRunTimeException(Throwable t, String errMsgFormat, Object... args)
t
- the throwable raised in the called class.errMsgFormat
- the error message format string.args
- referenced by the format specifiers in the format string.@InterfaceAudience.Public @InterfaceStability.Unstable public static RuntimeException logAndReturnRunTimeException(String errMsgFormat, Object... args)
errMsgFormat
- the error message format string.args
- referenced by the format specifiers in the format string.@InterfaceAudience.Public @InterfaceStability.Unstable public static org.apache.hadoop.yarn.exceptions.YarnRuntimeException logAndReturnYarnRunTimeException(Throwable t, String errMsgFormat, Object... args)
t
- the throwable raised in the called class.errMsgFormat
- the error message format string.args
- referenced by the format specifiers in the format string.@InterfaceAudience.Public @InterfaceStability.Unstable public static void validateApplicationId(String applicationId) throws IllegalArgumentException
applicationId
- applicationId of type stringIllegalArgumentException
- If the format of the applicationId is not accurate,
an IllegalArgumentException needs to be thrown.@InterfaceAudience.Public @InterfaceStability.Unstable public static void validateApplicationAttemptId(String appAttemptId) throws IllegalArgumentException
appAttemptId
- appAttemptId of type string.IllegalArgumentException
- If the format of the appAttemptId is not accurate,
an IllegalArgumentException needs to be thrown.@InterfaceAudience.Public @InterfaceStability.Unstable public static void validateContainerId(String containerId) throws IllegalArgumentException
containerId
- containerId of type string.IllegalArgumentException
- If the format of the appAttemptId is not accurate,
an IllegalArgumentException needs to be thrown.public static boolean isAllowedDelegationTokenOp() throws IOException
IOException
public static String getRenewerForToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier> token) throws IOException
IOException
public static org.apache.hadoop.security.UserGroupInformation setupUser(String userName)
userName
- userName.@InterfaceAudience.Public @InterfaceStability.Unstable public static void validateReservationId(String reservationId) throws IllegalArgumentException
reservationId
- reservationId.IllegalArgumentException
- If the format of the reservationId is not accurate,
an IllegalArgumentException needs to be thrown.public static org.apache.hadoop.yarn.api.records.ReservationDefinition convertReservationDefinition(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ReservationDefinitionInfo definitionInfo)
definitionInfo
- ReservationDefinitionInfo Object.@InterfaceAudience.Public @InterfaceStability.Unstable public static void checkAppSubmissionContext(org.apache.hadoop.yarn.api.records.impl.pb.ApplicationSubmissionContextPBImpl appContext, org.apache.hadoop.conf.Configuration conf) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
appContext
- the app context to check.conf
- Configuration.IOException
- if an IO error occurred.org.apache.hadoop.yarn.exceptions.YarnException
- yarn exception.@InterfaceAudience.Private @InterfaceStability.Unstable public static org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext getTrimmedAppSubmissionContext(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext actualContext)
actualContext
- actual ApplicationSubmissionContext.public static boolean isRouterWebProxyEnable(org.apache.hadoop.conf.Configuration conf)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.