public final class FederationStateStoreUtils
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
FEDERATION_STORE_URL |
|
static org.slf4j.Logger |
LOG |
| Modifier and Type | Method | Description |
|---|---|---|
static org.apache.hadoop.security.token.delegation.DelegationKey |
convertMasterKeyToDelegationKey(RouterMasterKeyRequest request) |
Convert MasterKey to DelegationKey.
|
static void |
decodeWritable(org.apache.hadoop.io.Writable w,
java.lang.String idStr) |
Decode Base64 string to Writable object.
|
static java.lang.String |
encodeWritable(org.apache.hadoop.io.Writable key) |
Encode for Writable objects.
|
static boolean |
filterHomeSubCluster(SubClusterId filterSubCluster,
SubClusterId homeSubCluster) |
Filter HomeSubCluster based on Filter SubCluster.
|
static void |
logAndThrowException(org.slf4j.Logger log,
java.lang.String errMsg,
java.lang.Throwable t) |
Throws an exception due to an error in
FederationStateStore. |
static void |
logAndThrowInvalidInputException(org.slf4j.Logger log,
java.lang.String errMsg) |
Throws an
FederationStateStoreInvalidInputException due to an
error in FederationStateStore. |
static void |
logAndThrowRetriableException(java.lang.Throwable t,
org.slf4j.Logger log,
java.lang.String errMsgFormat,
java.lang.Object... args) |
Throws an
FederationStateStoreRetriableException due to an
error in FederationStateStore. |
static void |
logAndThrowRetriableException(org.slf4j.Logger log,
java.lang.String errMsgFormat,
java.lang.Object... args) |
Throws an
FederationStateStoreRetriableException due to an
error in FederationStateStore. |
static void |
logAndThrowRetriableException(org.slf4j.Logger log,
java.lang.String errMsg,
java.lang.Throwable t) |
Throws an
FederationStateStoreRetriableException due to an
error in FederationStateStore. |
static void |
logAndThrowStoreException(java.lang.Throwable t,
org.slf4j.Logger log,
java.lang.String errMsgFormat,
java.lang.Object... args) |
Throws an
FederationStateStoreException due to an error in
FederationStateStore. |
static void |
logAndThrowStoreException(org.slf4j.Logger log,
java.lang.String errMsg) |
Throws an
FederationStateStoreException due to an error in
FederationStateStore. |
static void |
logAndThrowStoreException(org.slf4j.Logger log,
java.lang.String errMsgFormat,
java.lang.Object... args) |
Throws an
FederationStateStoreException due to an error in
FederationStateStore. |
static void |
returnToPool(org.slf4j.Logger log,
java.sql.CallableStatement cstmt) |
Returns the SQL
FederationStateStore connections to the pool. |
static void |
returnToPool(org.slf4j.Logger log,
java.sql.CallableStatement cstmt,
java.sql.Connection conn) |
Returns the SQL
FederationStateStore connections to the pool. |
static void |
returnToPool(org.slf4j.Logger log,
java.sql.CallableStatement cstmt,
java.sql.Connection conn,
java.sql.ResultSet rs) |
Returns the SQL
FederationStateStore connections to the pool. |
static void |
setPassword(com.zaxxer.hikari.HikariDataSource dataSource,
java.lang.String password) |
Sets a specific password for
HikariDataSource SQL connections. |
static void |
setProperty(com.zaxxer.hikari.HikariDataSource dataSource,
java.lang.String property,
java.lang.String value) |
Sets a specific value for a specific property of
HikariDataSource SQL connections. |
static void |
setUsername(com.zaxxer.hikari.HikariDataSource dataSource,
java.lang.String userNameDB) |
Sets a specific username for
HikariDataSource SQL connections. |
public static final org.slf4j.Logger LOG
public static final java.lang.String FEDERATION_STORE_URL
public static void returnToPool(org.slf4j.Logger log,
java.sql.CallableStatement cstmt,
java.sql.Connection conn,
java.sql.ResultSet rs)
throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStore connections to the pool.log - the logger interfacecstmt - the interface used to execute SQL stored proceduresconn - the SQL connectionrs - the ResultSet interface used to execute SQL stored proceduresorg.apache.hadoop.yarn.exceptions.YarnException - on failurepublic static void returnToPool(org.slf4j.Logger log,
java.sql.CallableStatement cstmt,
java.sql.Connection conn)
throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStore connections to the pool.log - the logger interfacecstmt - the interface used to execute SQL stored proceduresconn - the SQL connectionorg.apache.hadoop.yarn.exceptions.YarnException - on failurepublic static void returnToPool(org.slf4j.Logger log,
java.sql.CallableStatement cstmt)
throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStore connections to the pool.log - the logger interfacecstmt - the interface used to execute SQL stored proceduresorg.apache.hadoop.yarn.exceptions.YarnException - on failurepublic static void logAndThrowException(org.slf4j.Logger log,
java.lang.String errMsg,
java.lang.Throwable t)
throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStore.log - the logger interfaceerrMsg - the error messaget - the throwable raised in the called class.org.apache.hadoop.yarn.exceptions.YarnException - on failurepublic static void logAndThrowStoreException(org.slf4j.Logger log,
java.lang.String errMsg)
throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStoreException due to an error in
FederationStateStore.log - the logger interfaceerrMsg - the error messageorg.apache.hadoop.yarn.exceptions.YarnException - on failurepublic static void logAndThrowStoreException(org.slf4j.Logger log,
java.lang.String errMsgFormat,
java.lang.Object... args)
throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStoreException due to an error in
FederationStateStore.log - the logger interfaceerrMsgFormat - the error message format string.args - referenced by the format specifiers in the format string.org.apache.hadoop.yarn.exceptions.YarnException - on failurepublic static void logAndThrowStoreException(java.lang.Throwable t,
org.slf4j.Logger log,
java.lang.String errMsgFormat,
java.lang.Object... args)
throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStoreException due to an error in
FederationStateStore.t - the throwable raised in the called class.log - the logger interface.errMsgFormat - the error message format string.args - referenced by the format specifiers in the format string.org.apache.hadoop.yarn.exceptions.YarnException - on failurepublic static void logAndThrowInvalidInputException(org.slf4j.Logger log,
java.lang.String errMsg)
throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStoreInvalidInputException due to an
error in FederationStateStore.log - the logger interfaceerrMsg - the error messageorg.apache.hadoop.yarn.exceptions.YarnException - on failurepublic static void logAndThrowRetriableException(org.slf4j.Logger log,
java.lang.String errMsg,
java.lang.Throwable t)
throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStoreRetriableException due to an
error in FederationStateStore.log - the logger interfaceerrMsg - the error messaget - the throwable raised in the called class.org.apache.hadoop.yarn.exceptions.YarnException - on failurepublic static void logAndThrowRetriableException(java.lang.Throwable t,
org.slf4j.Logger log,
java.lang.String errMsgFormat,
java.lang.Object... args)
throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStoreRetriableException due to an
error in FederationStateStore.t - the throwable raised in the called class.log - the logger interface.errMsgFormat - the error message format string.args - referenced by the format specifiers in the format string.org.apache.hadoop.yarn.exceptions.YarnException - on failurepublic static void logAndThrowRetriableException(org.slf4j.Logger log,
java.lang.String errMsgFormat,
java.lang.Object... args)
throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStoreRetriableException due to an
error in FederationStateStore.log - the logger interface.errMsgFormat - the error message format string.args - referenced by the format specifiers in the format string.org.apache.hadoop.yarn.exceptions.YarnException - on failurepublic static void setProperty(com.zaxxer.hikari.HikariDataSource dataSource,
java.lang.String property,
java.lang.String value)
HikariDataSource SQL connections.dataSource - the HikariDataSource connectionsproperty - the property to setvalue - the value to setpublic static void setUsername(com.zaxxer.hikari.HikariDataSource dataSource,
java.lang.String userNameDB)
HikariDataSource SQL connections.dataSource - the HikariDataSource connectionsuserNameDB - the value to setpublic static void setPassword(com.zaxxer.hikari.HikariDataSource dataSource,
java.lang.String password)
HikariDataSource SQL connections.dataSource - the HikariDataSource connectionspassword - the value to setpublic static boolean filterHomeSubCluster(SubClusterId filterSubCluster, SubClusterId homeSubCluster)
filterSubCluster - filter query conditionshomeSubCluster - homeSubClusterpublic static java.lang.String encodeWritable(org.apache.hadoop.io.Writable key)
throws java.io.IOException
key - Writable Key.java.io.IOException - raised on errors performing I/O.public static void decodeWritable(org.apache.hadoop.io.Writable w,
java.lang.String idStr)
throws java.io.IOException
w - Writable Key.idStr - base64 string.java.io.IOException - raised on errors performing I/O.public static org.apache.hadoop.security.token.delegation.DelegationKey convertMasterKeyToDelegationKey(RouterMasterKeyRequest request)
request - RouterMasterKeyRequestCopyright © 2008–2025 Apache Software Foundation. All rights reserved.