@ThreadSafe public class CapacityBaseRandomPolicy extends Object implements BlockLocationPolicy
BlockLocationPolicy.Factory
Constructor and Description |
---|
CapacityBaseRandomPolicy(AlluxioConfiguration ignoredConf)
Constructs a new
CapacityBaseRandomPolicy
needed for instantiation in BlockLocationPolicy.Factory . |
Modifier and Type | Method and Description |
---|---|
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 ignoredConf)
CapacityBaseRandomPolicy
needed for instantiation in BlockLocationPolicy.Factory
.ignoredConf
- is unusedpublic 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)
Copyright © 2023. All Rights Reserved.