Class DownloadFilesRequest

  • All Implemented Interfaces:
    org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

    public class DownloadFilesRequest
    extends Object
    implements org.apache.avro.generic.IndexedRecord
    A set of parameters for GPUdb.downloadFiles.

    Downloads one or more files from KiFS.

    • Constructor Detail

      • DownloadFilesRequest

        public DownloadFilesRequest()
        Constructs a DownloadFilesRequest object with default parameters.
      • DownloadFilesRequest

        public DownloadFilesRequest​(List<String> fileNames,
                                    List<Long> readOffsets,
                                    List<Long> readLengths,
                                    Map<String,​String> options)
        Constructs a DownloadFilesRequest object with the specified parameters.
        Parameters:
        fileNames - An array of the file names to download from KiFS. File paths may contain wildcard characters after the KiFS directory delimiter. Accepted wildcard characters are asterisk (*) to represent any string of zero or more characters, and question mark (?) to indicate a single character.
        readOffsets - An array of starting byte offsets from which to read each respective file in fileNames. Must either be empty or the same length as fileNames. If empty, files are downloaded in their entirety. If not empty, readLengths must also not be empty.
        readLengths - Array of number of bytes to read from each respective file in fileNames. Must either be empty or the same length as fileNames. If empty, files are downloaded in their entirety. If not empty, readOffsets must also not be empty.
        options - Optional parameters.
        • FILE_ENCODING: Encoding to be applied to the output file data. When using JSON serialization it is recommended to specify this as BASE64. Supported values:
          • BASE64: Apply base64 encoding to the output file data.
          • NONE: Do not apply any encoding to the output file data.
          The default value is NONE.
        The default value is an empty Map.
    • Method Detail

      • getClassSchema

        public static org.apache.avro.Schema getClassSchema()
        This method supports the Avro framework and is not intended to be called directly by the user.
        Returns:
        The schema for the class.
      • getFileNames

        public List<String> getFileNames()
        An array of the file names to download from KiFS. File paths may contain wildcard characters after the KiFS directory delimiter.

        Accepted wildcard characters are asterisk (*) to represent any string of zero or more characters, and question mark (?) to indicate a single character.

        Returns:
        The current value of fileNames.
      • setFileNames

        public DownloadFilesRequest setFileNames​(List<String> fileNames)
        An array of the file names to download from KiFS. File paths may contain wildcard characters after the KiFS directory delimiter.

        Accepted wildcard characters are asterisk (*) to represent any string of zero or more characters, and question mark (?) to indicate a single character.

        Parameters:
        fileNames - The new value for fileNames.
        Returns:
        this to mimic the builder pattern.
      • getReadOffsets

        public List<Long> getReadOffsets()
        An array of starting byte offsets from which to read each respective file in fileNames. Must either be empty or the same length as fileNames. If empty, files are downloaded in their entirety. If not empty, readLengths must also not be empty.
        Returns:
        The current value of readOffsets.
      • setReadOffsets

        public DownloadFilesRequest setReadOffsets​(List<Long> readOffsets)
        An array of starting byte offsets from which to read each respective file in fileNames. Must either be empty or the same length as fileNames. If empty, files are downloaded in their entirety. If not empty, readLengths must also not be empty.
        Parameters:
        readOffsets - The new value for readOffsets.
        Returns:
        this to mimic the builder pattern.
      • getReadLengths

        public List<Long> getReadLengths()
        Array of number of bytes to read from each respective file in fileNames. Must either be empty or the same length as fileNames. If empty, files are downloaded in their entirety. If not empty, readOffsets must also not be empty.
        Returns:
        The current value of readLengths.
      • setReadLengths

        public DownloadFilesRequest setReadLengths​(List<Long> readLengths)
        Array of number of bytes to read from each respective file in fileNames. Must either be empty or the same length as fileNames. If empty, files are downloaded in their entirety. If not empty, readOffsets must also not be empty.
        Parameters:
        readLengths - The new value for readLengths.
        Returns:
        this to mimic the builder pattern.
      • getOptions

        public Map<String,​String> getOptions()
        Optional parameters.
        • FILE_ENCODING: Encoding to be applied to the output file data. When using JSON serialization it is recommended to specify this as BASE64. Supported values:
          • BASE64: Apply base64 encoding to the output file data.
          • NONE: Do not apply any encoding to the output file data.
          The default value is NONE.
        The default value is an empty Map.
        Returns:
        The current value of options.
      • setOptions

        public DownloadFilesRequest setOptions​(Map<String,​String> options)
        Optional parameters.
        • FILE_ENCODING: Encoding to be applied to the output file data. When using JSON serialization it is recommended to specify this as BASE64. Supported values:
          • BASE64: Apply base64 encoding to the output file data.
          • NONE: Do not apply any encoding to the output file data.
          The default value is NONE.
        The default value is an empty Map.
        Parameters:
        options - The new value for options.
        Returns:
        this to mimic the builder pattern.
      • getSchema

        public org.apache.avro.Schema getSchema()
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        getSchema in interface org.apache.avro.generic.GenericContainer
        Returns:
        The schema object describing this class.
      • get

        public Object get​(int index)
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        get in interface org.apache.avro.generic.IndexedRecord
        Parameters:
        index - the position of the field to get
        Returns:
        value of the field with the given index.
        Throws:
        IndexOutOfBoundsException
      • put

        public void put​(int index,
                        Object value)
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        put in interface org.apache.avro.generic.IndexedRecord
        Parameters:
        index - the position of the field to set
        value - the value to set
        Throws:
        IndexOutOfBoundsException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object