Interface VolumeManager
- All Known Implementing Classes:
VolumeManagerImpl
@Private
@Unstable
public interface VolumeManager
Main interface for volume manager that manages all volumes.
Volume manager talks to a CSI controller plugin to handle the
volume operations before it is available to be published on
any node manager.
-
Method Summary
Modifier and TypeMethodDescriptionaddOrGetVolume(Volume volume) Start to supervise on a volume.org.apache.hadoop.yarn.api.CsiAdaptorProtocolgetAdaptorByDriverName(String driverName) Returns the csi-driver-adaptor client from cache by the given driver name.voidregisterCsiDriverAdaptor(String driverName, org.apache.hadoop.yarn.api.CsiAdaptorProtocol client) Register a csi-driver-adaptor to the volume manager.schedule(VolumeProvisioningTask volumeProvisioningTask, int delaySecond) Execute volume provisioning tasks as backend threads.
-
Method Details
-
getVolumeStates
VolumeStates getVolumeStates()- Returns:
- all known volumes and their states.
-
addOrGetVolume
Start to supervise on a volume.- Parameters:
volume- volume.- Returns:
- the volume being managed by the manager.
-
schedule
ScheduledFuture<VolumeProvisioningResults> schedule(VolumeProvisioningTask volumeProvisioningTask, int delaySecond) Execute volume provisioning tasks as backend threads.- Parameters:
volumeProvisioningTask- A provisioning task encapsulates all the logic required by a storage system to provision a volume.delaySecond- delay Second.- Returns:
- ScheduledFuture.
-
registerCsiDriverAdaptor
void registerCsiDriverAdaptor(String driverName, org.apache.hadoop.yarn.api.CsiAdaptorProtocol client) Register a csi-driver-adaptor to the volume manager.- Parameters:
driverName- driver name.client- csi adaptor protocol client.
-
getAdaptorByDriverName
Returns the csi-driver-adaptor client from cache by the given driver name. If the client is not found, null is returned.- Parameters:
driverName- driver name.- Returns:
- a csi-driver-adaptor client working for given driver or null if the adaptor could not be found.
-