public class VolumeManagerImpl extends org.apache.hadoop.service.AbstractService implements VolumeManager
| Constructor and Description |
|---|
VolumeManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
Volume |
addOrGetVolume(Volume volume)
Start to supervise on a volume.
|
org.apache.hadoop.yarn.api.CsiAdaptorProtocol |
getAdaptorByDriverName(String driverName)
Returns a CsiAdaptorProtocol client by the given driver name,
returns null if no adaptor is found for the driver, that means
the driver has not registered to the volume manager yet enhance not valid.
|
VolumeStates |
getVolumeStates() |
void |
registerCsiDriverAdaptor(String driverName,
org.apache.hadoop.yarn.api.CsiAdaptorProtocol client)
Register a csi-driver-adaptor to the volume manager.
|
ScheduledFuture<VolumeProvisioningResults> |
schedule(VolumeProvisioningTask volumeProvisioningTask,
int delaySecond)
Execute volume provisioning tasks as backend threads.
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop() |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic org.apache.hadoop.yarn.api.CsiAdaptorProtocol getAdaptorByDriverName(String driverName)
getAdaptorByDriverName in interface VolumeManagerdriverName - the name of the driver@VisibleForTesting public void registerCsiDriverAdaptor(String driverName, org.apache.hadoop.yarn.api.CsiAdaptorProtocol client)
VolumeManagerregisterCsiDriverAdaptor in interface VolumeManagerdriverName - driver name.client - csi adaptor protocol client.protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStop()
throws Exception
serviceStop in class org.apache.hadoop.service.AbstractServiceExceptionpublic VolumeStates getVolumeStates()
getVolumeStates in interface VolumeManagerpublic Volume addOrGetVolume(Volume volume)
VolumeManageraddOrGetVolume in interface VolumeManagervolume - volume.public ScheduledFuture<VolumeProvisioningResults> schedule(VolumeProvisioningTask volumeProvisioningTask, int delaySecond)
VolumeManagerschedule in interface VolumeManagervolumeProvisioningTask - A provisioning task encapsulates
all the logic required by a storage system to provision a volume.delaySecond - delay Second.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.