Class ResourceLocalizationService
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service,org.apache.hadoop.yarn.event.EventHandler<LocalizationEvent>,LocalizationProtocol
public class ResourceLocalizationService
extends org.apache.hadoop.service.CompositeService
implements org.apache.hadoop.yarn.event.EventHandler<LocalizationEvent>, LocalizationProtocol
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.service.CompositeService
org.apache.hadoop.service.CompositeService.CompositeServiceShutdownHookNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.hadoop.yarn.event.Dispatcherstatic final Stringstatic final org.apache.hadoop.fs.permission.FsPermissionFields inherited from class org.apache.hadoop.service.CompositeService
STOP_ONLY_STARTED_SERVICES -
Constructor Summary
ConstructorsConstructorDescriptionResourceLocalizationService(org.apache.hadoop.yarn.event.Dispatcher dispatcher, ContainerExecutor exec, DeletionService delService, LocalDirsHandlerService dirsHandler, Context context, NodeManagerMetrics metrics) -
Method Summary
Modifier and TypeMethodDescriptiongetLocalizedResource(LocalResourceRequest req, String user, org.apache.hadoop.yarn.api.records.ApplicationId appId) org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService.LocalizerRunnergetLocalizerRunner(String locId) Map<String,org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService.LocalizerRunner> org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService.PublicLocalizervoidhandle(LocalizationEvent event) heartbeat(LocalizerStatus status) voidvoidserviceInit(org.apache.hadoop.conf.Configuration conf) voidvoidMethods inherited from class org.apache.hadoop.service.CompositeService
addIfService, addService, getServices, removeServiceMethods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
-
Field Details
-
NM_PRIVATE_DIR
- See Also:
-
NM_PRIVATE_PERM
public static final org.apache.hadoop.fs.permission.FsPermission NM_PRIVATE_PERM -
dispatcher
protected final org.apache.hadoop.yarn.event.Dispatcher dispatcher
-
-
Constructor Details
-
ResourceLocalizationService
public ResourceLocalizationService(org.apache.hadoop.yarn.event.Dispatcher dispatcher, ContainerExecutor exec, DeletionService delService, LocalDirsHandlerService dirsHandler, Context context, NodeManagerMetrics metrics)
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
recoverLocalizedResources
public void recoverLocalizedResources(NMStateStoreService.RecoveredLocalizationState state) throws URISyntaxException, IOException - Throws:
URISyntaxExceptionIOException
-
heartbeat
- Specified by:
heartbeatin interfaceLocalizationProtocol
-
serviceStart
- Overrides:
serviceStartin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
serviceStop
- Overrides:
serviceStopin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
handle
- Specified by:
handlein interfaceorg.apache.hadoop.yarn.event.EventHandler<LocalizationEvent>
-
getPublicLocalizer
@VisibleForTesting @Private public org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService.PublicLocalizer getPublicLocalizer() -
getLocalizerRunner
@VisibleForTesting @Private public org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService.LocalizerRunner getLocalizerRunner(String locId) -
getPrivateLocalizers
-
getLocalizedResource
public LocalizedResource getLocalizedResource(LocalResourceRequest req, String user, org.apache.hadoop.yarn.api.records.ApplicationId appId)
-