Skip to main content

Class GPUdbFileHandler.Options

java.lang.Object
com.gpudb.filesystem.GPUdbFileHandler.Options
Enclosing class:

public static final class GPUdbFileHandler.Options extends Object
This class models the options available for modifying some behaviors of the GPUdbFileHandler class.
  • Constructor Details

  • Method Details

    • getFullFileDispatcherThreadpoolSize

      public int getFullFileDispatcherThreadpoolSize()
      Returns the size of the thread pool used internally to handle batches of full file uploads. The default value is 5.
      Returns:
      The configured size of the dispatcher thread pool.
      See Also:
    • setFullFileDispatcherThreadpoolSize

      public GPUdbFileHandler.Options setFullFileDispatcherThreadpoolSize(int fullFileDispatcherThreadpoolSize) throws GPUdbException
      Sets the size of the thread pool used internally to handle batches of full file uploads. The default value is 5.
      Parameters:
      fullFileDispatcherThreadpoolSize - The number of threads that the file dispatcher pool should use.
      Returns:
      The current GPUdbFileHandler.Options instance.
      Throws:
      GPUdbException - If the given thread pool size is invalid in the current execution environment.
      See Also:
    • getFileSizeToSplit

      public long getFileSizeToSplit()
      Gets the value of the file split size—files smaller than this size will be uploaded in batches up to this size, and files greater than this size will be uploaded in parts up to this size.
      Returns:
      The file split size in bytes.
      See Also:
    • getMaxUploadBytesInFlight

      public long getMaxUploadBytesInFlight()
      Gets the ceiling on full-file upload payloads held in memory at once, across batches submitted to the dispatcher but not yet collected.
      Returns:
      the maximum in-flight upload size in bytes.
      See Also:
    • setMaxUploadBytesInFlight

      public void setMaxUploadBytesInFlight(long maxUploadBytesInFlight) throws GPUdbException
      Sets the ceiling on full-file upload payloads held in memory at once.

      Lower it further than the default where memory is tight: an upload then waits for outstanding batches to finish more often, trading throughput for a smaller peak. Raise it to enable more thoughput where memory is plentiful.

      Parameters:
      maxUploadBytesInFlight - The ceiling in bytes; must be positive.
      Throws:
    • setFileSizeToSplit

      public void setFileSizeToSplit(long fileSizeToSplit) throws GPUdbException