public final class FederationStateStoreFacade extends Object
Modifier and Type | Method and Description |
---|---|
SubClusterId |
addApplicationHomeSubCluster(ApplicationHomeSubCluster appHomeSubCluster)
Adds the home
SubClusterId for the specified ApplicationId . |
void |
addApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
ApplicationHomeSubCluster homeSubCluster)
Add ApplicationHomeSubCluster to FederationStateStore.
|
void |
addOrUpdateApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
SubClusterId subClusterId,
int retryCount,
org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext appSubmissionContext)
Add or Update ApplicationHomeSubCluster.
|
void |
addOrUpdateReservationHomeSubCluster(org.apache.hadoop.yarn.api.records.ReservationId reservationId,
SubClusterId subClusterId,
int retryCount)
Add or Update ReservationHomeSubCluster.
|
SubClusterId |
addReservationHomeSubCluster(ReservationHomeSubCluster appHomeSubCluster)
Adds the home
SubClusterId for the specified ReservationId . |
void |
addReservationHomeSubCluster(org.apache.hadoop.yarn.api.records.ReservationId reservationId,
ReservationHomeSubCluster homeSubCluster)
Save Reservation And HomeSubCluster Mapping.
|
static <T> T |
createInstance(org.apache.hadoop.conf.Configuration conf,
String configuredClassName,
String defaultValue,
Class<T> type)
Helper method to create instances of Object using the class name specified
in the configuration object.
|
static <T> Object |
createRetryInstance(org.apache.hadoop.conf.Configuration conf,
String configuredClassName,
String defaultValue,
Class<T> type,
org.apache.hadoop.io.retry.RetryPolicy retryPolicy)
Helper method to create instances of Object using the class name defined in
the configuration object.
|
static org.apache.hadoop.io.retry.RetryPolicy |
createRetryPolicy(org.apache.hadoop.conf.Configuration conf)
Create a RetryPolicy for
FederationStateStoreFacade . |
void |
deleteAllPoliciesConfigurations() |
void |
deleteApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Delete the mapping of home
SubClusterId of a previously submitted
ApplicationId . |
void |
deletePolicyConfigurations(List<String> queuesList) |
void |
deleteReservationHomeSubCluster(org.apache.hadoop.yarn.api.records.ReservationId reservationId)
Delete the home
SubClusterId for the specified
ReservationId . |
void |
deleteStore() |
boolean |
deregisterSubCluster(SubClusterId subClusterId,
SubClusterState subClusterState)
Deregister subCluster, Update the subCluster state to
SC_LOST、SC_DECOMMISSIONED etc.
|
boolean |
existsApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Query SubClusterId By applicationId.
|
boolean |
existsReservationHomeSubCluster(org.apache.hadoop.yarn.api.records.ReservationId reservationId)
Exists ReservationHomeSubCluster Mapping.
|
Collection<SubClusterInfo> |
getActiveSubClusters()
Get active subclusters.
|
int |
getActiveSubClustersCount()
Get the number of active cluster nodes.
|
SubClusterId |
getApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId appId)
Returns the home
SubClusterId for the specified
ApplicationId . |
List<ApplicationHomeSubCluster> |
getApplicationsHomeSubCluster()
Get the
ApplicationHomeSubCluster list representing the mapping of
all submitted applications to it's home sub-cluster. |
org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext |
getApplicationSubmissionContext(org.apache.hadoop.yarn.api.records.ApplicationId appId)
Get ApplicationSubmissionContext according to ApplicationId.
|
org.apache.hadoop.conf.Configuration |
getConf()
Get the configuration.
|
int |
getCurrentKeyId()
Get CurrentKeyId from stateStore.
|
int |
getDelegationTokenSeqNum()
Get SeqNum from stateStore.
|
FederationCache |
getFederationCache() |
static FederationStateStoreFacade |
getInstance()
Returns the singleton instance of the FederationStateStoreFacade object.
|
static FederationStateStoreFacade |
getInstance(org.apache.hadoop.conf.Configuration conf)
Returns the singleton instance of the FederationStateStoreFacade object.
|
RouterMasterKeyResponse |
getMasterKeyByDelegationKey(org.apache.hadoop.security.token.delegation.DelegationKey newKey)
The Router Supports GetMasterKeyByDelegationKey.
|
Map<String,SubClusterPolicyConfiguration> |
getPoliciesConfigurations()
Get the policies that is represented as
SubClusterPolicyConfiguration for all currently active queues in
the system. |
SubClusterPolicyConfiguration |
getPolicyConfiguration(String queue)
Returns the
SubClusterPolicyConfiguration for the specified queue. |
static SubClusterId |
getRandomActiveSubCluster(Map<SubClusterId,SubClusterInfo> activeSubClusters,
List<SubClusterId> blackList)
Randomly pick ActiveSubCluster.
|
SubClusterId |
getReservationHomeSubCluster(org.apache.hadoop.yarn.api.records.ReservationId reservationId)
Returns the home
SubClusterId for the specified ReservationId . |
int |
getRetryNumbers(int configRetries)
Get the number of retries.
|
FederationStateStore |
getStateStore() |
SubClusterInfo |
getSubCluster(SubClusterId subClusterId)
Returns the
SubClusterInfo for the specified SubClusterId . |
SubClusterInfo |
getSubCluster(SubClusterId subClusterId,
boolean flushCache)
Updates the cache with the central
FederationStateStore and returns
the SubClusterInfo for the specified SubClusterId . |
SubClusterResolver |
getSubClusterResolver()
Get the singleton instance of SubClusterResolver.
|
Map<SubClusterId,SubClusterInfo> |
getSubClusters(boolean filterInactiveSubClusters)
Returns the
SubClusterInfo of all active sub cluster(s). |
Map<SubClusterId,SubClusterInfo> |
getSubClusters(boolean filterInactiveSubClusters,
boolean flushCache)
Updates the cache with the central
FederationStateStore and returns
the SubClusterInfo of all active sub cluster(s). |
RouterRMTokenResponse |
getTokenByRouterStoreToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier)
The Router Supports GetTokenByRouterStoreToken
RMDelegationTokenIdentifier . |
int |
incrementCurrentKeyId()
stateStore provides CurrentKeyId increase.
|
int |
incrementDelegationTokenSeqNum()
stateStore provides DelegationTokenSeqNum increase.
|
void |
reinitialize(FederationStateStore store,
org.apache.hadoop.conf.Configuration config)
Delete and re-initialize the cache, to force it to use the given
configuration.
|
void |
removeStoredMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey newKey)
The Router Supports Remove MasterKey (RouterMasterKey
RouterMasterKey ). |
void |
removeStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier)
The Router Supports Remove RMDelegationTokenIdentifier
RMDelegationTokenIdentifier . |
void |
setDelegationTokenSeqNum(int seqNum)
Set SeqNum from stateStore.
|
void |
setPolicyConfiguration(SubClusterPolicyConfiguration policyConf)
Set a policy configuration into the state store.
|
RouterMasterKeyResponse |
storeNewMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey newKey)
The Router Supports Store NewMasterKey (RouterMasterKey
RouterMasterKey ). |
void |
storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
long renewDate)
The Router Supports Store RMDelegationTokenIdentifier
RMDelegationTokenIdentifier . |
void |
storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
long renewDate,
String tokenInfo)
The Router Supports Store RMDelegationTokenIdentifier
RMDelegationTokenIdentifier . |
void |
updateApplicationHomeSubCluster(ApplicationHomeSubCluster appHomeSubCluster)
Updates the home
SubClusterId for the specified
ApplicationId . |
void |
updateApplicationHomeSubCluster(SubClusterId subClusterId,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
ApplicationHomeSubCluster homeSubCluster)
Update ApplicationHomeSubCluster to FederationStateStore.
|
void |
updateReservationHomeSubCluster(ReservationHomeSubCluster appHomeSubCluster)
Updates the home
SubClusterId for the specified
ReservationId . |
void |
updateReservationHomeSubCluster(SubClusterId subClusterId,
org.apache.hadoop.yarn.api.records.ReservationId reservationId,
ReservationHomeSubCluster homeSubCluster)
Update Reservation And HomeSubCluster Mapping.
|
void |
updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
long renewDate)
The Router Supports Update RMDelegationTokenIdentifier
RMDelegationTokenIdentifier . |
void |
updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
long renewDate,
String tokenInfo)
The Router Supports Update RMDelegationTokenIdentifier
RMDelegationTokenIdentifier . |
@VisibleForTesting public void reinitialize(FederationStateStore store, org.apache.hadoop.conf.Configuration config)
store
- the FederationStateStore
instance to reinitialize withconfig
- the updated configuration to reinitialize withpublic static org.apache.hadoop.io.retry.RetryPolicy createRetryPolicy(org.apache.hadoop.conf.Configuration conf)
FederationStateStoreFacade
. In case of
failure, it retries for:
FederationStateStoreRetriableException
CacheLoaderException
conf
- the updated configurationpublic static FederationStateStoreFacade getInstance()
FederationStateStoreFacade
instancepublic static FederationStateStoreFacade getInstance(org.apache.hadoop.conf.Configuration conf)
conf
- configuration.FederationStateStoreFacade
instancepublic SubClusterInfo getSubCluster(SubClusterId subClusterId) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterInfo
for the specified SubClusterId
.subClusterId
- the identifier of the sub-clusternull
if there is no mapping for the subClusterIdorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic SubClusterInfo getSubCluster(SubClusterId subClusterId, boolean flushCache) throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStore
and returns
the SubClusterInfo
for the specified SubClusterId
.subClusterId
- the identifier of the sub-clusterflushCache
- flag to indicate if the cache should be flushed or notorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic Map<SubClusterId,SubClusterInfo> getSubClusters(boolean filterInactiveSubClusters) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterInfo
of all active sub cluster(s).filterInactiveSubClusters
- whether to filter out inactive
sub-clustersorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic Map<SubClusterId,SubClusterInfo> getSubClusters(boolean filterInactiveSubClusters, boolean flushCache) throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStore
and returns
the SubClusterInfo
of all active sub cluster(s).filterInactiveSubClusters
- whether to filter out inactive
sub-clustersflushCache
- flag to indicate if the cache should be flushed or notorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic SubClusterPolicyConfiguration getPolicyConfiguration(String queue) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterPolicyConfiguration
for the specified queue.queue
- the queue whose policy is requirednull
if there is no
mapping for the queueorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic void setPolicyConfiguration(SubClusterPolicyConfiguration policyConf) throws org.apache.hadoop.yarn.exceptions.YarnException
policyConf
- the policy configuration to setorg.apache.hadoop.yarn.exceptions.YarnException
- if the request is invalid/failspublic Map<String,SubClusterPolicyConfiguration> getPoliciesConfigurations() throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterPolicyConfiguration
for all currently active queues in
the system.org.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic SubClusterId addApplicationHomeSubCluster(ApplicationHomeSubCluster appHomeSubCluster) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterId
for the specified ApplicationId
.appHomeSubCluster
- the mapping of the application to it's home
sub-clusterorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic void updateApplicationHomeSubCluster(ApplicationHomeSubCluster appHomeSubCluster) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterId
for the specified
ApplicationId
.appHomeSubCluster
- the mapping of the application to it's home
sub-clusterorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic SubClusterId getApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterId
for the specified
ApplicationId
.appId
- the identifier of the applicationorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic SubClusterResolver getSubClusterResolver()
public org.apache.hadoop.conf.Configuration getConf()
public SubClusterId addReservationHomeSubCluster(ReservationHomeSubCluster appHomeSubCluster) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterId
for the specified ReservationId
.appHomeSubCluster
- the mapping of the reservation to it's home
sub-clusterorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic SubClusterId getReservationHomeSubCluster(org.apache.hadoop.yarn.api.records.ReservationId reservationId) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterId
for the specified ReservationId
.reservationId
- the identifier of the reservationorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic void updateReservationHomeSubCluster(ReservationHomeSubCluster appHomeSubCluster) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterId
for the specified
ReservationId
.appHomeSubCluster
- the mapping of the reservation to it's home
sub-clusterorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic void deleteReservationHomeSubCluster(org.apache.hadoop.yarn.api.records.ReservationId reservationId) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterId
for the specified
ReservationId
.reservationId
- the identifier of the reservationorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulpublic static <T> Object createRetryInstance(org.apache.hadoop.conf.Configuration conf, String configuredClassName, String defaultValue, Class<T> type, org.apache.hadoop.io.retry.RetryPolicy retryPolicy)
RetryProxy
using
the specific RetryPolicy
.T
- The type of the instance.conf
- the yarn configurationconfiguredClassName
- the configuration provider keydefaultValue
- the default implementation for fallbacktype
- the class for which a retry proxy is requiredretryPolicy
- the policy for retrying method call failurespublic static <T> T createInstance(org.apache.hadoop.conf.Configuration conf, String configuredClassName, String defaultValue, Class<T> type)
T
- The type of the instance to createconf
- the yarn configurationconfiguredClassName
- the configuration provider keydefaultValue
- the default implementation classtype
- the required interface/base class@VisibleForTesting public FederationStateStore getStateStore()
public RouterMasterKeyResponse storeNewMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey newKey) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
RouterMasterKey
).newKey
- Key used for generating and verifying delegation tokensorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulIOException
- An IO Error occurredpublic void removeStoredMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey newKey) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
RouterMasterKey
).newKey
- Key used for generating and verifying delegation tokensorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulIOException
- An IO Error occurredpublic RouterMasterKeyResponse getMasterKeyByDelegationKey(org.apache.hadoop.security.token.delegation.DelegationKey newKey) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
newKey
- Key used for generating and verifying delegation tokensorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulIOException
- An IO Error occurredpublic void storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier, long renewDate) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
RMDelegationTokenIdentifier
.identifier
- delegation tokens from the RMrenewDate
- renewDateorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulIOException
- An IO Error occurredpublic void storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier, long renewDate, String tokenInfo) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
RMDelegationTokenIdentifier
.identifier
- delegation tokens from the RM.renewDate
- renewDate.tokenInfo
- tokenInfo.org.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessful.IOException
- An IO Error occurred.public void updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier, long renewDate) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
RMDelegationTokenIdentifier
.identifier
- delegation tokens from the RMrenewDate
- renewDateorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulIOException
- An IO Error occurredpublic void updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier, long renewDate, String tokenInfo) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
RMDelegationTokenIdentifier
.identifier
- delegation tokens from the RMrenewDate
- renewDatetokenInfo
- tokenInfo.org.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessful.IOException
- An IO Error occurred.public void removeStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
RMDelegationTokenIdentifier
.identifier
- delegation tokens from the RMorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulIOException
- An IO Error occurredpublic RouterRMTokenResponse getTokenByRouterStoreToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
RMDelegationTokenIdentifier
.identifier
- delegation tokens from the RMorg.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessfulIOException
- An IO Error occurredpublic int incrementDelegationTokenSeqNum()
public int getDelegationTokenSeqNum()
public void setDelegationTokenSeqNum(int seqNum)
seqNum
- delegationTokenSequenceNumber.public int getCurrentKeyId()
public int incrementCurrentKeyId()
public int getActiveSubClustersCount() throws org.apache.hadoop.yarn.exceptions.YarnException
org.apache.hadoop.yarn.exceptions.YarnException
- if the call to the state store is unsuccessful.public static SubClusterId getRandomActiveSubCluster(Map<SubClusterId,SubClusterInfo> activeSubClusters, List<SubClusterId> blackList) throws org.apache.hadoop.yarn.exceptions.YarnException
activeSubClusters
- List of active subClusters.blackList
- blacklist.org.apache.hadoop.yarn.exceptions.YarnException
- When there is no Active SubCluster,
an exception will be thrown (No active SubCluster available to submit the request.)public int getRetryNumbers(int configRetries) throws org.apache.hadoop.yarn.exceptions.YarnException
configRetries
- User-configured number of retries.org.apache.hadoop.yarn.exceptions.YarnException
- yarn exception.public boolean existsApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
applicationId
- applicationIdpublic void addApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId applicationId, ApplicationHomeSubCluster homeSubCluster) throws org.apache.hadoop.yarn.exceptions.YarnException
applicationId
- applicationId.homeSubCluster
- homeSubCluster, homeSubCluster selected according to policy.org.apache.hadoop.yarn.exceptions.YarnException
- yarn exception.public List<ApplicationHomeSubCluster> getApplicationsHomeSubCluster() throws org.apache.hadoop.yarn.exceptions.YarnException
ApplicationHomeSubCluster
list representing the mapping of
all submitted applications to it's home sub-cluster.org.apache.hadoop.yarn.exceptions.YarnException
- if the request is invalid/failspublic void deleteApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId applicationId) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterId
of a previously submitted
ApplicationId
. Currently response is empty if the operation is
successful, if not an exception reporting reason for a failure.applicationId
- the application to delete the home sub-cluster oforg.apache.hadoop.yarn.exceptions.YarnException
- if the request is invalid/failspublic void updateApplicationHomeSubCluster(SubClusterId subClusterId, org.apache.hadoop.yarn.api.records.ApplicationId applicationId, ApplicationHomeSubCluster homeSubCluster) throws org.apache.hadoop.yarn.exceptions.YarnException
subClusterId
- homeSubClusterIdapplicationId
- applicationId.homeSubCluster
- homeSubCluster, homeSubCluster selected according to policy.org.apache.hadoop.yarn.exceptions.YarnException
- yarn exception.public void addOrUpdateApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId applicationId, SubClusterId subClusterId, int retryCount, org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext appSubmissionContext) throws org.apache.hadoop.yarn.exceptions.YarnException
applicationId
- applicationId, is the id of the application.subClusterId
- homeSubClusterId, this is selected by strategy.retryCount
- number of retries.appSubmissionContext
- appSubmissionContext.org.apache.hadoop.yarn.exceptions.YarnException
- yarn exception.public boolean existsReservationHomeSubCluster(org.apache.hadoop.yarn.api.records.ReservationId reservationId)
reservationId
- reservationIdpublic void addReservationHomeSubCluster(org.apache.hadoop.yarn.api.records.ReservationId reservationId, ReservationHomeSubCluster homeSubCluster) throws org.apache.hadoop.yarn.exceptions.YarnException
reservationId
- reservationIdhomeSubCluster
- homeSubClusterorg.apache.hadoop.yarn.exceptions.YarnException
- on failurepublic void updateReservationHomeSubCluster(SubClusterId subClusterId, org.apache.hadoop.yarn.api.records.ReservationId reservationId, ReservationHomeSubCluster homeSubCluster) throws org.apache.hadoop.yarn.exceptions.YarnException
subClusterId
- subClusterIdreservationId
- reservationIdhomeSubCluster
- homeSubClusterorg.apache.hadoop.yarn.exceptions.YarnException
- on failurepublic void addOrUpdateReservationHomeSubCluster(org.apache.hadoop.yarn.api.records.ReservationId reservationId, SubClusterId subClusterId, int retryCount) throws org.apache.hadoop.yarn.exceptions.YarnException
reservationId
- reservationId.subClusterId
- homeSubClusterId, this is selected by strategy.retryCount
- number of retries.org.apache.hadoop.yarn.exceptions.YarnException
- yarn exception.public boolean deregisterSubCluster(SubClusterId subClusterId, SubClusterState subClusterState) throws org.apache.hadoop.yarn.exceptions.YarnException
subClusterId
- subClusterId.subClusterState
- The state of the subCluster to be updated.org.apache.hadoop.yarn.exceptions.YarnException
- yarn exception.public Collection<SubClusterInfo> getActiveSubClusters() throws org.apache.hadoop.yarn.webapp.NotFoundException
org.apache.hadoop.yarn.webapp.NotFoundException
public org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext getApplicationSubmissionContext(org.apache.hadoop.yarn.api.records.ApplicationId appId)
appId
- ApplicationIdpublic void deleteAllPoliciesConfigurations() throws Exception
Exception
@VisibleForTesting public FederationCache getFederationCache()
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.