public final class FederationStateStoreUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
FEDERATION_STORE_URL |
static org.slf4j.Logger |
LOG |
| Modifier and Type | Method and 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,
String idStr)
Decode Base64 string to Writable object.
|
static 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,
String errMsg,
Throwable t)
Throws an exception due to an error in
FederationStateStore. |
static void |
logAndThrowInvalidInputException(org.slf4j.Logger log,
String errMsg)
Throws an
FederationStateStoreInvalidInputException due to an
error in FederationStateStore. |
static void |
logAndThrowRetriableException(org.slf4j.Logger log,
String errMsgFormat,
Object... args)
Throws an
FederationStateStoreRetriableException due to an
error in FederationStateStore. |
static void |
logAndThrowRetriableException(org.slf4j.Logger log,
String errMsg,
Throwable t)
Throws an
FederationStateStoreRetriableException due to an
error in FederationStateStore. |
static void |
logAndThrowRetriableException(Throwable t,
org.slf4j.Logger log,
String errMsgFormat,
Object... args)
Throws an
FederationStateStoreRetriableException due to an
error in FederationStateStore. |
static void |
logAndThrowStoreException(org.slf4j.Logger log,
String errMsg)
Throws an
FederationStateStoreException due to an error in
FederationStateStore. |
static void |
logAndThrowStoreException(org.slf4j.Logger log,
String errMsgFormat,
Object... args)
Throws an
FederationStateStoreException due to an error in
FederationStateStore. |
static void |
logAndThrowStoreException(Throwable t,
org.slf4j.Logger log,
String errMsgFormat,
Object... args)
Throws an
FederationStateStoreException due to an error in
FederationStateStore. |
static void |
returnToPool(org.slf4j.Logger log,
CallableStatement cstmt)
Returns the SQL
FederationStateStore connections to the pool. |
static void |
returnToPool(org.slf4j.Logger log,
CallableStatement cstmt,
Connection conn)
Returns the SQL
FederationStateStore connections to the pool. |
static void |
returnToPool(org.slf4j.Logger log,
CallableStatement cstmt,
Connection conn,
ResultSet rs)
Returns the SQL
FederationStateStore connections to the pool. |
static void |
setPassword(com.zaxxer.hikari.HikariDataSource dataSource,
String password)
Sets a specific password for
HikariDataSource SQL connections. |
static void |
setProperty(com.zaxxer.hikari.HikariDataSource dataSource,
String property,
String value)
Sets a specific value for a specific property of
HikariDataSource SQL connections. |
static void |
setUsername(com.zaxxer.hikari.HikariDataSource dataSource,
String userNameDB)
Sets a specific username for
HikariDataSource SQL connections. |
public static final org.slf4j.Logger LOG
public static final String FEDERATION_STORE_URL
public static void returnToPool(org.slf4j.Logger log,
CallableStatement cstmt,
Connection conn,
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,
CallableStatement cstmt,
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,
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,
String errMsg,
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,
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,
String errMsgFormat,
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(Throwable t, org.slf4j.Logger log, String errMsgFormat, 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,
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,
String errMsg,
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(Throwable t, org.slf4j.Logger log, String errMsgFormat, 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,
String errMsgFormat,
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,
String property,
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,
String userNameDB)
HikariDataSource SQL connections.dataSource - the HikariDataSource connectionsuserNameDB - the value to setpublic static void setPassword(com.zaxxer.hikari.HikariDataSource dataSource,
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 String encodeWritable(org.apache.hadoop.io.Writable key) throws IOException
key - Writable Key.IOException - raised on errors performing I/O.public static void decodeWritable(org.apache.hadoop.io.Writable w,
String idStr)
throws IOException
w - Writable Key.idStr - base64 string.IOException - raised on errors performing I/O.public static org.apache.hadoop.security.token.delegation.DelegationKey convertMasterKeyToDelegationKey(RouterMasterKeyRequest request)
request - RouterMasterKeyRequestCopyright © 2008–2024 Apache Software Foundation. All rights reserved.