@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.PurgePolicyexecutor, USER_HOMEDIR_ACL_PERMISSIONSDEFAULT_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(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Actions to take when the AM container is completed
|
void |
onApplicationAttemptAdded(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) |
void |
onApplicationAttemptRegistered(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId,
String host,
int rpcport,
String trackingurl) |
void |
onApplicationAttemptUnregistered(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
Actions to take when an application attempt is completed
|
void |
onApplicationCompleted(org.apache.hadoop.yarn.api.records.ApplicationId id)
Actions to take when an application is completed
|
void |
onApplicationLaunched(org.apache.hadoop.yarn.api.records.ApplicationId id) |
void |
onApplicationMasterRegistered(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
Actions to take as an AM registers itself with the RM.
|
void |
onContainerFinished(org.apache.hadoop.yarn.api.records.ContainerId id)
Actions to take when the AM container is completed
|
void |
onStateStoreEvent(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
String user)
This is the event where the user is known, so the user directory
can be created
|
protected void |
purgeAppAttemptRecords(org.apache.hadoop.yarn.api.records.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(org.apache.hadoop.conf.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, clearWriteAccessorspublic RMRegistryOperationsService(String name)
public RMRegistryOperationsService(String name, RegistryBindingSource bindingSource)
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class RegistryAdminServiceconf - configuration of the serviceExceptionpublic RegistryAdminService.PurgePolicy getPurgeOnCompletionPolicy()
public void setPurgeOnCompletionPolicy(RegistryAdminService.PurgePolicy purgeOnCompletionPolicy)
public void onApplicationAttemptRegistered(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId,
String host,
int rpcport,
String trackingurl)
throws IOException
IOExceptionpublic void onApplicationLaunched(org.apache.hadoop.yarn.api.records.ApplicationId id)
throws IOException
IOExceptionpublic void onApplicationMasterRegistered(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
throws IOException
attemptId - attempt IDIOException - problemspublic void onAMContainerFinished(org.apache.hadoop.yarn.api.records.ContainerId containerId)
throws IOException
containerId - container IDIOException - problemsprotected void purgeAppAttemptRecords(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
attemptId - attempt IDpublic void onApplicationAttemptUnregistered(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
throws IOException
attemptId - application IDIOException - problemspublic void onApplicationCompleted(org.apache.hadoop.yarn.api.records.ApplicationId id)
throws IOException
id - application IDIOException - problemspublic void onApplicationAttemptAdded(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
public void onStateStoreEvent(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
String user)
throws IOException
applicationId - application IDuser - usernameIOException - problemspublic void onContainerFinished(org.apache.hadoop.yarn.api.records.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 © 2022 Apache Software Foundation. All rights reserved.