@ThreadSafe public class CapacityBaseRandomPolicy extends Object implements BlockLocationPolicy
BlockLocationPolicy.Factory
Constructor and Description |
---|
CapacityBaseRandomPolicy(AlluxioConfiguration conf)
Constructs a new
CapacityBaseRandomPolicy
needed for instantiation in BlockLocationPolicy.Factory . |
Modifier and Type | Method and Description |
---|---|
protected void |
addWorkerToCache(Long blockId,
WorkerNetAddress targetWorker) |
protected WorkerNetAddress |
findCacheWorker(GetWorkerOptions options) |
Optional<WorkerNetAddress> |
getWorker(GetWorkerOptions options)
Gets the worker's network address for serving operations requested for the block.
|
protected long |
randomInCapacity(long totalCapacity) |
public CapacityBaseRandomPolicy(AlluxioConfiguration conf)
CapacityBaseRandomPolicy
needed for instantiation in BlockLocationPolicy.Factory
.conf
- Alluxio configurationpublic Optional<WorkerNetAddress> getWorker(GetWorkerOptions options)
BlockLocationPolicy
getWorker
in interface BlockLocationPolicy
options
- the options to get a block worker network address for a blockprotected long randomInCapacity(long totalCapacity)
protected WorkerNetAddress findCacheWorker(GetWorkerOptions options)
protected void addWorkerToCache(Long blockId, WorkerNetAddress targetWorker)
Copyright © 2023. All Rights Reserved.