Package alluxio.stress.cli.client
Class ClientIOWritePolicy
- java.lang.Object
-
- alluxio.stress.cli.client.ClientIOWritePolicy
-
- All Implemented Interfaces:
alluxio.client.block.policy.BlockLocationPolicy
@NotThreadSafe public final class ClientIOWritePolicy extends java.lang.Object implements alluxio.client.block.policy.BlockLocationPolicyWrite type for restricting the writes to a set number of workers. This should only be used for testing and benchmarking.
-
-
Constructor Summary
Constructors Constructor Description ClientIOWritePolicy(alluxio.conf.AlluxioConfiguration ignoredConf)Constructs a newClientIOWritePolicy.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.Optional<alluxio.wire.WorkerNetAddress>getWorker(alluxio.client.block.policy.options.GetWorkerOptions options)inthashCode()static voidsetMaxWorkers(int maxWorkers)Updates the global state to reflect the max number of workers to write to.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ClientIOWritePolicy
public ClientIOWritePolicy(alluxio.conf.AlluxioConfiguration ignoredConf)
Constructs a newClientIOWritePolicy. needed for instantiation inBlockLocationPolicy.Factory.- Parameters:
ignoredConf- is unused
-
-
Method Detail
-
setMaxWorkers
public static void setMaxWorkers(int maxWorkers)
Updates the global state to reflect the max number of workers to write to. This must be set before writes are performed to take effect.- Parameters:
maxWorkers- the max number of workers to write to
-
getWorker
public java.util.Optional<alluxio.wire.WorkerNetAddress> getWorker(alluxio.client.block.policy.options.GetWorkerOptions options)
- Specified by:
getWorkerin interfacealluxio.client.block.policy.BlockLocationPolicy- Parameters:
options- options- Returns:
- the address of the worker to write to
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-