public interface StorageManager extends Serializable
#getLocalStorageLocation(StorageBucketId,PartitionInstanceInfo)
to determine their storage "slot" or
#getRemoteStorageLocations(StorageBucketId)
to find other nodes storage slots.Modifier and Type | Method and Description |
---|---|
Path |
getMyStorageLocation(StorageBucketId bucketId,
NodeAllocationPlan.AssignmentPlan assignment)
Returns "my" storage location
|
NodeAllocationPlan |
getNodeAllocationPlan()
Returns the node allocation plan associated with this storage manager
|
int |
getNumWorkers(int maxParallelism)
Returns the number of workers allocated or
0 if this is a master storage manager. |
List<Path> |
getOtherStorageLocations(StorageBucketId bucketId,
int maxParallelism)
Returns storage locations for all workers up to the specified
maxParallelism . |
void |
releaseStorage(FileClient client)
Releases all storage for this storage manager
|
void |
releaseStorage(FileClient fileClient,
StoragePlanner storagePlanner)
Releases all storage for this storage manager that was allocated by the given planner
|
String |
toString() |
NodeAllocationPlan getNodeAllocationPlan()
UnsupportedOperationException
- if this is a master storage managerint getNumWorkers(int maxParallelism)
0
if this is a master storage manager. The result will be
capped at the specified maxParallelism
.maxParallelism
- the max parallelismList<Path> getOtherStorageLocations(StorageBucketId bucketId, int maxParallelism)
maxParallelism
. Data written to these locations will be visible to
individual nodes at their "my" storage locations and vice-versa. In the case where maxParallelism is 1,
this returns from the master storage location.maxParallelism
- the max parallelismUnsupportedOperationException
- if this is a master storage manager and maxParallelism is greater than 1.Path getMyStorageLocation(StorageBucketId bucketId, NodeAllocationPlan.AssignmentPlan assignment)
assignment
- "my" assignmentUnsupportedOperationException
- if this is a master storage manager and assignment is
for anything other than the master
assignment.void releaseStorage(FileClient client)
client
- the file clientvoid releaseStorage(FileClient fileClient, StoragePlanner storagePlanner)
fileClient
- the file clientstoragePlanner
- the storage plannerCopyright © 2024 Actian Corporation. All rights reserved.