@ThreadSafe public class CapacityBaseRandomPolicy extends java.lang.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(java.lang.Long blockId,
WorkerNetAddress targetWorker) |
protected WorkerNetAddress |
findCacheWorker(GetWorkerOptions options) |
java.util.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 java.util.Optional<WorkerNetAddress> getWorker(GetWorkerOptions options)
BlockLocationPolicygetWorker in interface BlockLocationPolicyoptions - the options to get a block worker network address for a blockprotected long randomInCapacity(long totalCapacity)
protected WorkerNetAddress findCacheWorker(GetWorkerOptions options)
protected void addWorkerToCache(java.lang.Long blockId,
WorkerNetAddress targetWorker)
Copyright © 2022. All Rights Reserved.