@InterfaceAudience.LimitedPrivate(value="YARN") @InterfaceStability.Evolving public class RMRegistryOperationsService extends RegistryAdminService
These actions are all implemented as event handlers to operations which come from the RM.
This service is expected to be executed by a user with the permissions to manipulate the entire registry,
RegistryAdminService.AsyncPurge, RegistryAdminService.NodeSelector, RegistryAdminService.PurgePolicyCompositeService.CompositeServiceShutdownHookService.STATEexecutor, USER_HOMEDIR_ACL_PERMISSIONSSTOP_ONLY_STARTED_SERVICESDEFAULT_REGISTRY_CLIENT_JAAS_CONTEXT, DEFAULT_REGISTRY_ENABLED, DEFAULT_REGISTRY_SECURE, DEFAULT_REGISTRY_SYSTEM_ACCOUNTS, DEFAULT_REGISTRY_USER_ACCOUNTS, DEFAULT_REGISTRY_ZK_QUORUM, DEFAULT_ZK_CONNECTION_TIMEOUT, DEFAULT_ZK_REGISTRY_ROOT, DEFAULT_ZK_RETRY_CEILING, DEFAULT_ZK_RETRY_INTERVAL, DEFAULT_ZK_RETRY_TIMES, DEFAULT_ZK_SESSION_TIMEOUT, KEY_REGISTRY_CLIENT_AUTH, KEY_REGISTRY_CLIENT_AUTHENTICATION_ID, KEY_REGISTRY_CLIENT_AUTHENTICATION_PASSWORD, KEY_REGISTRY_CLIENT_JAAS_CONTEXT, KEY_REGISTRY_ENABLED, KEY_REGISTRY_KERBEROS_REALM, KEY_REGISTRY_SECURE, KEY_REGISTRY_SYSTEM_ACCOUNTS, KEY_REGISTRY_USER_ACCOUNTS, KEY_REGISTRY_ZK_CONNECTION_TIMEOUT, KEY_REGISTRY_ZK_QUORUM, KEY_REGISTRY_ZK_RETRY_CEILING, KEY_REGISTRY_ZK_RETRY_INTERVAL, KEY_REGISTRY_ZK_RETRY_TIMES, KEY_REGISTRY_ZK_ROOT, KEY_REGISTRY_ZK_SESSION_TIMEOUT, PATH_SYSTEM_SERVICES, PATH_USER_SERVICES, PATH_USERS, REGISTRY_CLIENT_AUTH_ANONYMOUS, REGISTRY_CLIENT_AUTH_DIGEST, REGISTRY_CLIENT_AUTH_KERBEROS, REGISTRY_PREFIX, SUBPATH_COMPONENTS, ZK_PREFIX| Constructor and Description |
|---|
RMRegistryOperationsService(String name) |
RMRegistryOperationsService(String name,
RegistryBindingSource bindingSource) |
| Modifier and Type | Method and Description |
|---|---|
RegistryAdminService.PurgePolicy |
getPurgeOnCompletionPolicy() |
void |
onAMContainerFinished(ContainerId containerId)
Actions to take when the AM container is completed
|
void |
onApplicationAttemptAdded(ApplicationAttemptId appAttemptId) |
void |
onApplicationAttemptRegistered(ApplicationAttemptId attemptId,
String host,
int rpcport,
String trackingurl) |
void |
onApplicationAttemptUnregistered(ApplicationAttemptId attemptId)
Actions to take when an application attempt is completed
|
void |
onApplicationCompleted(ApplicationId id)
Actions to take when an application is completed
|
void |
onApplicationLaunched(ApplicationId id) |
void |
onApplicationMasterRegistered(ApplicationAttemptId attemptId)
Actions to take as an AM registers itself with the RM.
|
void |
onContainerFinished(ContainerId id)
Actions to take when the AM container is completed
|
void |
onStateStoreEvent(ApplicationId applicationId,
String user)
This is the event where the user is known, so the user directory
can be created
|
protected void |
purgeAppAttemptRecords(ApplicationAttemptId attemptId)
remove all application attempt entries
|
Future<Integer> |
purgeRecordsAsync(String path,
String id,
String persistencePolicyMatch)
Queue an async operation to purge all matching records under a base path.
|
Future<Integer> |
purgeRecordsAsync(String path,
String id,
String persistencePolicyMatch,
RegistryAdminService.PurgePolicy purgePolicy,
org.apache.curator.framework.api.BackgroundCallback callback)
Queue an async operation to purge all matching records under a base path.
|
protected void |
serviceInit(Configuration conf)
Extend the parent service initialization by verifying that the
service knows —in a secure cluster— the realm in which it is executing.
|
void |
setPurgeOnCompletionPolicy(RegistryAdminService.PurgePolicy purgeOnCompletionPolicy) |
aclsForUser, createDirAsync, createRootRegistryPaths, getExecutor, homeDir, initUserRegistry, initUserRegistryAsync, purge, serviceStart, serviceStop, stopExecutor, submit, verifyRealmValiditybind, delete, exists, getClientAcls, list, mknode, resolve, stat, validatePathaddWriteAccessor, bindingDiagnosticDetails, buildConnectionString, buildSecurityDiagnostics, clearWriteAccessors, createEnsembleProvider, createFullPath, dumpPath, dumpRegistryRobustly, getBindingSource, getRegistrySecurity, isSecure, maybeCreate, operationFailure, operationFailure, supplyBindingInformation, toString, zkCreate, zkDelete, zkGetACLS, zkList, zkMkParentPath, zkMkPath, zkPathExists, zkPathMustExist, zkRead, zkSet, zkStat, zkUpdateaddIfService, addService, getServices, removeServiceclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddWriteAccessor, clearWriteAccessorsclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStoppublic RMRegistryOperationsService(String name)
public RMRegistryOperationsService(String name, RegistryBindingSource bindingSource)
protected void serviceInit(Configuration conf) throws Exception
serviceInit in class RegistryAdminServiceconf - configuration of the serviceExceptionpublic RegistryAdminService.PurgePolicy getPurgeOnCompletionPolicy()
public void setPurgeOnCompletionPolicy(RegistryAdminService.PurgePolicy purgeOnCompletionPolicy)
public void onApplicationAttemptRegistered(ApplicationAttemptId attemptId, String host, int rpcport, String trackingurl) throws IOException
IOExceptionpublic void onApplicationLaunched(ApplicationId id) throws IOException
IOExceptionpublic void onApplicationMasterRegistered(ApplicationAttemptId attemptId) throws IOException
attemptId - attempt IDIOException - problemspublic void onAMContainerFinished(ContainerId containerId) throws IOException
containerId - container IDIOException - problemsprotected void purgeAppAttemptRecords(ApplicationAttemptId attemptId)
attemptId - attempt IDpublic void onApplicationAttemptUnregistered(ApplicationAttemptId attemptId) throws IOException
attemptId - application IDIOException - problemspublic void onApplicationCompleted(ApplicationId id) throws IOException
id - application IDIOException - problemspublic void onApplicationAttemptAdded(ApplicationAttemptId appAttemptId)
public void onStateStoreEvent(ApplicationId applicationId, String user) throws IOException
applicationId - application IDuser - usernameIOException - problemspublic void onContainerFinished(ContainerId id) throws IOException
id - container IDIOException - problemspublic Future<Integer> purgeRecordsAsync(String path, String id, String persistencePolicyMatch)
path - base pathid - ID for service record.idpersistencePolicyMatch - ID for the persistence policy to match:
no match, no delete.public Future<Integer> purgeRecordsAsync(String path, String id, String persistencePolicyMatch, RegistryAdminService.PurgePolicy purgePolicy, org.apache.curator.framework.api.BackgroundCallback callback)
path - base pathid - ID for service record.idpersistencePolicyMatch - ID for the persistence policy to match:
no match, no delete.purgePolicy - how to react to children under the entrycallback - an optional callbackCopyright © 2018 CERN. All Rights Reserved.