Class FileIoOptions


  • public class FileIoOptions
    extends Object
    Controls how client performs file I/O operations. Only applies to file-based workloads.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileIoOptions​(boolean shouldStream, double diskThroughputGbps, boolean directIo)
      Constructor with all parameters.
    • Constructor Detail

      • FileIoOptions

        public FileIoOptions​(boolean shouldStream,
                             double diskThroughputGbps,
                             boolean directIo)
        Constructor with all parameters.
        Parameters:
        shouldStream - Whether to skip buffering the part in memory before sending the request
        diskThroughputGbps - The estimated disk throughput in gigabits per second (Gbps)
        directIo - Whether to enable direct I/O to bypass the OS cache
    • Method Detail

      • getShouldStream

        public boolean getShouldStream()
        Gets whether to skip buffering the part in memory before sending the request.
        Returns:
        true if streaming is enabled, false otherwise
      • setShouldStream

        public void setShouldStream​(boolean shouldStream)
        Sets whether to skip buffering the part in memory before sending the request. If set to true, set the diskThroughputGbps to reasonably align with the available disk throughput. Otherwise, the transfer may fail with connection starvation.
        Parameters:
        shouldStream - true to enable streaming, false otherwise
      • getDiskThroughputGbps

        public double getDiskThroughputGbps()
        Gets the estimated disk throughput in gigabits per second (Gbps).
        Returns:
        the estimated disk throughput in Gbps
      • setDiskThroughputGbps

        public void setDiskThroughputGbps​(double diskThroughputGbps)
        Sets the estimated disk throughput in gigabits per second (Gbps). Only applied when shouldStream is true.
        Parameters:
        diskThroughputGbps - the estimated disk throughput in Gbps
      • getDirectIo

        public boolean getDirectIo()
        Gets whether direct I/O is enabled to bypass the OS cache.
        Returns:
        true if direct I/O is enabled, false otherwise
      • setDirectIo

        public void setDirectIo​(boolean directIo)
        Sets whether to enable direct I/O to bypass the OS cache. Helpful when the disk I/O outperforms the kernel cache. Notes: - Only supported on Linux for now. - Only supports upload for now.
        Parameters:
        directIo - true to enable direct I/O, false otherwise