Skip to content

Commit

Permalink
YARN-9708. Fix CheckStyle.
Browse files Browse the repository at this point in the history
  • Loading branch information
slfan1989 committed Aug 17, 2022
1 parent 8dfa838 commit b00e0a1
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,74 +36,80 @@
public interface FederationDelegationTokenStateStore {

/**
* The Router Supports Store the New Master Key.
* The Router Supports Store NewMasterKey.
* During this Process, Facade will call the specific StateStore to store the MasterKey.
*
* @param request The request contains RouterMasterKey, which is an abstraction for DelegationKey
* @return routerMasterKeyResponse
* @throws YarnException An internal conversion error occurred when store the Token
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
RouterMasterKeyResponse storeNewMasterKey(RouterMasterKeyRequest request)
throws YarnException, IOException;

/**
* The Router Supports Remove the master key.
* The Router Supports Remove MasterKey.
* During this Process, Facade will call the specific StateStore to remove the MasterKey.
*
* @param request DelegationKey.
* @return RemoveStoredMasterKeyResponse.
* @throws YarnException exception occurred.
* @param request The request contains RouterMasterKey, which is an abstraction for DelegationKey
* @return routerMasterKeyResponse
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
RouterMasterKeyResponse removeStoredMasterKey(RouterMasterKeyRequest request)
throws YarnException, IOException;

/**
* The Router supports obtaining MasterKey based on KeyId.
* The Router Supports GetMasterKeyByDelegationKey.
*
* @param request
* @return
* @throws YarnException
* @throws IOException
* @param request The request contains RouterMasterKey, which is an abstraction for DelegationKey
* @return routerMasterKeyResponse
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
RouterMasterKeyResponse getMasterKeyByDelegationKey(RouterMasterKeyRequest request)
throws YarnException, IOException;

/**
* The Router Supports Store new Token.
* The Router Supports Store RMDelegationTokenIdentifier.
*
* @param request DelegationKey.
* @return RouterRMTokenResponse.
* @throws YarnException exception occurred.
* @param request The request contains RouterRMToken (RMDelegationTokenIdentifier and renewDate)
* @return routerRMTokenResponse.
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
RouterRMTokenResponse storeNewToken(RouterRMTokenRequest request)
throws YarnException, IOException;

/**
* The Router Supports Update Token.
* The Router Supports Update RMDelegationTokenIdentifier.
*
* @param request DelegationKey.
* @param request The request contains RouterRMToken (RMDelegationTokenIdentifier and renewDate)
* @return RouterRMTokenResponse.
* @throws YarnException exception occurred.
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
RouterRMTokenResponse updateStoredToken(RouterRMTokenRequest request)
throws YarnException, IOException;

/**
* The Router Supports Remove Token.
* The Router Supports Remove RMDelegationTokenIdentifier.
*
* @param request DelegationKey.
* @param request The request contains RouterRMToken (RMDelegationTokenIdentifier and renewDate)
* @return RouterRMTokenResponse.
* @throws YarnException exception occurred.
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
RouterRMTokenResponse removeStoredToken(RouterRMTokenRequest request)
throws YarnException, IOException;

/**
* The Router Supports Remove Token.
* The Router Supports GetTokenByRouterStoreToken.
*
* @param request DelegationKey.
* @param request The request contains RouterRMToken (RMDelegationTokenIdentifier and renewDate)
* @return RouterRMTokenResponse.
* @throws YarnException exception occurred.
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
RouterRMTokenResponse getTokenByRouterStoreToken(RouterRMTokenRequest request)
throws YarnException, IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,7 @@ public SubClusterId getReservationHomeSubCluster(ReservationId reservationId)
}

/**
* The Router Supports Store New Token.
* Returns the RouterMasterKey{@link RouterMasterKey} for the delegation key.
* The Router Supports Store NewMasterKey (RouterMasterKey{@link RouterMasterKey}).
*
* @param newKey Key used for generating and verifying delegation tokens
* @throws YarnException if the call to the state store is unsuccessful
Expand All @@ -475,10 +474,11 @@ public RouterMasterKeyResponse storeNewMasterKey(DelegationKey newKey)
}

/**
* The Router supports remove the master key.
* The Router Supports Remove MasterKey (RouterMasterKey{@link RouterMasterKey}).
*
* @param newKey DelegationKey
* @throws Exception An error occurred
* @param newKey Key used for generating and verifying delegation tokens
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
public void removeStoredMasterKey(DelegationKey newKey) throws YarnException, IOException {
LOG.info("Removing master key with keyID {}.", newKey.getKeyId());
Expand All @@ -490,10 +490,11 @@ public void removeStoredMasterKey(DelegationKey newKey) throws YarnException, IO
}

/**
* The Router supports obtaining MasterKey based on KeyId.
* The Router Supports GetMasterKeyByDelegationKey.
*
* @param newKey DelegationKey
* @throws Exception An error occurred
* @param newKey Key used for generating and verifying delegation tokens
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
public RouterMasterKeyResponse getMasterKeyByDelegationKey(DelegationKey newKey)
throws YarnException, IOException {
Expand All @@ -506,11 +507,12 @@ public RouterMasterKeyResponse getMasterKeyByDelegationKey(DelegationKey newKey)
}

/**
* The Router Supports Store new Token.
* The Router Supports Store RMDelegationTokenIdentifier{@link RMDelegationTokenIdentifier}.
*
* @param identifier Delegation Token
* @param identifier delegation tokens from the RM
* @param renewDate renewDate
* @throws IOException IO exception occurred.
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
public void storeNewToken(RMDelegationTokenIdentifier identifier,
long renewDate) throws YarnException, IOException {
Expand All @@ -522,11 +524,12 @@ public void storeNewToken(RMDelegationTokenIdentifier identifier,
}

/**
* The Router Supports Update Token.
* The Router Supports Update RMDelegationTokenIdentifier{@link RMDelegationTokenIdentifier}.
*
* @param identifier Delegation Token
* @param identifier delegation tokens from the RM
* @param renewDate renewDate
* @throws IOException IO exception occurred.
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
public void updateStoredToken(RMDelegationTokenIdentifier identifier,
long renewDate) throws YarnException, IOException {
Expand All @@ -538,10 +541,11 @@ public void updateStoredToken(RMDelegationTokenIdentifier identifier,
}

/**
* The Router Supports Remove Token.
* The Router Supports Remove RMDelegationTokenIdentifier{@link RMDelegationTokenIdentifier}.
*
* @param identifier Delegation Token
* @throws IOException IO exception occurred.
* @param identifier delegation tokens from the RM
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
public void removeStoredToken(RMDelegationTokenIdentifier identifier)
throws YarnException, IOException{
Expand All @@ -553,11 +557,12 @@ public void removeStoredToken(RMDelegationTokenIdentifier identifier)
}

/**
* The Router Supports Remove Token.
* The Router Supports GetTokenByRouterStoreToken{@link RMDelegationTokenIdentifier}.
*
* @param identifier Delegation Token
* @return RouterRMTokenResponse.
* @throws YarnException exception occurred.
* @param identifier delegation tokens from the RM
* @return RouterStoreToken
* @throws YarnException if the call to the state store is unsuccessful
* @throws IOException An IO Error occurred
*/
public RouterRMTokenResponse getTokenByRouterStoreToken(RMDelegationTokenIdentifier identifier)
throws YarnException, IOException {
Expand Down

0 comments on commit b00e0a1

Please sign in to comment.