Class FederationMembershipStateStoreInputValidator
java.lang.Object
org.apache.hadoop.yarn.server.federation.store.utils.FederationMembershipStateStoreInputValidator
Utility class to validate the inputs to
FederationMembershipStateStore, allows a fail fast mechanism for
invalid user inputs.-
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcheckSubClusterId(SubClusterId subClusterId) Validate if the SubCluster Id is present or not.static voidcheckSubClusterInfo(SubClusterInfo subClusterInfo) Validate if all the required fields onSubClusterInfoare present or not.static voidvalidate(GetSubClusterInfoRequest request) Quick validation on the input to check some obvious fail conditions (fail fast).static voidvalidate(SubClusterDeregisterRequest request) Quick validation on the input to check some obvious fail conditions (fail fast).static voidvalidate(SubClusterHeartbeatRequest request) Quick validation on the input to check some obvious fail conditions (fail fast).static voidvalidate(SubClusterRegisterRequest request) Quick validation on the input to check some obvious fail conditions (fail fast).
-
Method Details
-
validate
public static void validate(SubClusterRegisterRequest request) throws FederationStateStoreInvalidInputException Quick validation on the input to check some obvious fail conditions (fail fast). Check if the providedSubClusterRegisterRequestfor registration a new subcluster is valid or not.- Parameters:
request- theSubClusterRegisterRequestto validate against- Throws:
FederationStateStoreInvalidInputException- if the request is invalid
-
validate
public static void validate(SubClusterDeregisterRequest request) throws FederationStateStoreInvalidInputException Quick validation on the input to check some obvious fail conditions (fail fast). Check if the providedSubClusterDeregisterRequestfor deregistration a subcluster is valid or not.- Parameters:
request- theSubClusterDeregisterRequestto validate against- Throws:
FederationStateStoreInvalidInputException- if the request is invalid
-
validate
public static void validate(SubClusterHeartbeatRequest request) throws FederationStateStoreInvalidInputException Quick validation on the input to check some obvious fail conditions (fail fast). Check if the providedSubClusterHeartbeatRequestfor heartbeating a subcluster is valid or not.- Parameters:
request- theSubClusterHeartbeatRequestto validate against- Throws:
FederationStateStoreInvalidInputException- if the request is invalid
-
validate
public static void validate(GetSubClusterInfoRequest request) throws FederationStateStoreInvalidInputException Quick validation on the input to check some obvious fail conditions (fail fast). Check if the providedGetSubClusterInfoRequestfor querying subcluster's information is valid or not.- Parameters:
request- theGetSubClusterInfoRequestto validate against- Throws:
FederationStateStoreInvalidInputException- if the request is invalid
-
checkSubClusterInfo
public static void checkSubClusterInfo(SubClusterInfo subClusterInfo) throws FederationStateStoreInvalidInputException Validate if all the required fields onSubClusterInfoare present or not.Capabilitywill be empty as the correspondingResourceManageris in the process of initialization during registration.- Parameters:
subClusterInfo- the information of the subcluster to be verified- Throws:
FederationStateStoreInvalidInputException- if the SubCluster Info are invalid
-
checkSubClusterId
protected static void checkSubClusterId(SubClusterId subClusterId) throws FederationStateStoreInvalidInputException Validate if the SubCluster Id is present or not.- Parameters:
subClusterId- the identifier of the subcluster to be verified- Throws:
FederationStateStoreInvalidInputException- if the SubCluster Id is invalid
-