Class ClientIOWritePolicy

  • All Implemented Interfaces:
    alluxio.client.block.policy.BlockLocationPolicy

    @NotThreadSafe
    public final class ClientIOWritePolicy
    extends java.lang.Object
    implements alluxio.client.block.policy.BlockLocationPolicy
    Write type for restricting the writes to a set number of workers. This should only be used for testing and benchmarking.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface alluxio.client.block.policy.BlockLocationPolicy

        alluxio.client.block.policy.BlockLocationPolicy.Factory
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.util.Optional<alluxio.wire.WorkerNetAddress> getWorker​(alluxio.client.block.policy.options.GetWorkerOptions options)  
      int hashCode()  
      static void setMaxWorkers​(int maxWorkers)
      Updates the global state to reflect the max number of workers to write to.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ClientIOWritePolicy

        public ClientIOWritePolicy​(alluxio.conf.AlluxioConfiguration ignoredConf)
        Constructs a new ClientIOWritePolicy. needed for instantiation in BlockLocationPolicy.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:
        getWorker in interface alluxio.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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object