@Private
@Unstable
public final class RouterServerUtil
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static org.slf4j.Logger |
LOG |
| Modifier and Type | Method | 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(java.lang.String policyManager,
java.util.List<java.lang.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,
java.lang.String pipeLineClassName,
java.lang.String interceptorClassName,
java.lang.Class<R> clazz) |
|
static java.lang.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 java.lang.RuntimeException |
logAndReturnRunTimeException(java.lang.String errMsgFormat,
java.lang.Object... args) |
Throws an RunTimeException due to an error.
|
static java.lang.RuntimeException |
logAndReturnRunTimeException(java.lang.Throwable t,
java.lang.String errMsgFormat,
java.lang.Object... args) |
Throws an RunTimeException due to an error.
|
static org.apache.hadoop.yarn.exceptions.YarnRuntimeException |
logAndReturnYarnRunTimeException(java.lang.Throwable t,
java.lang.String errMsgFormat,
java.lang.Object... args) |
Throws an YarnRuntimeException due to an error.
|
static void |
logAndThrowException(java.lang.String errMsg) |
Throws an exception due to an error.
|
static void |
logAndThrowException(java.lang.String errMsg,
java.lang.Throwable t) |
Throws an exception due to an error.
|
static void |
logAndThrowException(java.lang.Throwable t,
java.lang.String errMsgFormat,
java.lang.Object... args) |
Throws an exception due to an error.
|
static void |
logAndThrowIOException(java.lang.String errMsg,
java.lang.Throwable t) |
Throws an IOException due to an error.
|
static void |
logAndThrowIOException(java.lang.Throwable t,
java.lang.String errMsgFormat,
java.lang.Object... args) |
Throws an IOException due to an error.
|
static void |
logAndThrowRunTimeException(java.lang.String errMsg,
java.lang.Throwable t) |
Throws an RunTimeException due to an error.
|
static void |
logAndThrowRunTimeException(java.lang.Throwable t,
java.lang.String errMsgFormat,
java.lang.Object... args) |
Throws an RunTimeException due to an error.
|
static org.apache.hadoop.security.UserGroupInformation |
setupUser(java.lang.String userName) |
Set User information.
|
static void |
validateApplicationAttemptId(java.lang.String appAttemptId) |
Check appAttemptId is accurate.
|
static void |
validateApplicationId(java.lang.String applicationId) |
Check applicationId is accurate.
|
static void |
validateContainerId(java.lang.String containerId) |
Check containerId is accurate.
|
static void |
validateReservationId(java.lang.String reservationId) |
Check reservationId is accurate.
|
@Public
@Unstable
public static void logAndThrowException(java.lang.Throwable t,
java.lang.String errMsgFormat,
java.lang.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@Public
@Unstable
public static void logAndThrowException(java.lang.String errMsg,
java.lang.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@Public
@Unstable
public static void logAndThrowException(java.lang.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,
java.lang.String pipeLineClassName,
java.lang.String interceptorClassName,
java.lang.Class<R> clazz)
@Public
@Unstable
public static void logAndThrowIOException(java.lang.String errMsg,
java.lang.Throwable t)
throws java.io.IOException
errMsg - the error messaget - the throwable raised in the called class.java.io.IOException - on failure@Public
@Unstable
public static void logAndThrowIOException(java.lang.Throwable t,
java.lang.String errMsgFormat,
java.lang.Object... args)
throws java.io.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.java.io.IOException - on failure@Public
@Unstable
public static void logAndThrowRunTimeException(java.lang.String errMsg,
java.lang.Throwable t)
throws java.lang.RuntimeException
errMsg - the error messaget - the throwable raised in the called class.java.lang.RuntimeException - on failure@Public
@Unstable
public static void logAndThrowRunTimeException(java.lang.Throwable t,
java.lang.String errMsgFormat,
java.lang.Object... args)
throws java.lang.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.java.lang.RuntimeException - on failure@Public
@Unstable
public static java.lang.RuntimeException logAndReturnRunTimeException(java.lang.Throwable t,
java.lang.String errMsgFormat,
java.lang.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.@Public
@Unstable
public static java.lang.RuntimeException logAndReturnRunTimeException(java.lang.String errMsgFormat,
java.lang.Object... args)
errMsgFormat - the error message format string.args - referenced by the format specifiers in the format string.@Public
@Unstable
public static org.apache.hadoop.yarn.exceptions.YarnRuntimeException logAndReturnYarnRunTimeException(java.lang.Throwable t,
java.lang.String errMsgFormat,
java.lang.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.@Public
@Unstable
public static void validateApplicationId(java.lang.String applicationId)
throws java.lang.IllegalArgumentException
applicationId - applicationId of type stringjava.lang.IllegalArgumentException - If the format of the applicationId is not accurate,
an IllegalArgumentException needs to be thrown.@Public
@Unstable
public static void validateApplicationAttemptId(java.lang.String appAttemptId)
throws java.lang.IllegalArgumentException
appAttemptId - appAttemptId of type string.java.lang.IllegalArgumentException - If the format of the appAttemptId is not accurate,
an IllegalArgumentException needs to be thrown.@Public
@Unstable
public static void validateContainerId(java.lang.String containerId)
throws java.lang.IllegalArgumentException
containerId - containerId of type string.java.lang.IllegalArgumentException - If the format of the appAttemptId is not accurate,
an IllegalArgumentException needs to be thrown.public static boolean isAllowedDelegationTokenOp()
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getRenewerForToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier> token)
throws java.io.IOException
java.io.IOExceptionpublic static org.apache.hadoop.security.UserGroupInformation setupUser(java.lang.String userName)
userName - userName.@Public
@Unstable
public static void validateReservationId(java.lang.String reservationId)
throws java.lang.IllegalArgumentException
reservationId - reservationId.java.lang.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.@Public
@Unstable
public static void checkAppSubmissionContext(org.apache.hadoop.yarn.api.records.impl.pb.ApplicationSubmissionContextPBImpl appContext,
org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException,
org.apache.hadoop.yarn.exceptions.YarnException
appContext - the app context to check.conf - Configuration.java.io.IOException - if an IO error occurred.org.apache.hadoop.yarn.exceptions.YarnException - yarn exception.@Private @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)
public static boolean checkPolicyManagerValid(java.lang.String policyManager,
java.util.List<java.lang.String> supportWeightList)
throws org.apache.hadoop.yarn.exceptions.YarnException
org.apache.hadoop.yarn.exceptions.YarnExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.