Interface FlinkReadEngine

All Known Implementing Classes:
FlinkReadEngineImpl

public interface FlinkReadEngine
  • Method Details

    • asDataFlow

      org.apache.flink.api.common.functions.MapFunction<Partition,byte[]> asDataFlow()
      Retrieves an flink map function that download data for each partition.

      Returns:
      the pekko flow
      Throws:
      DataClientNonRetriableException - in case of non-retriable error
      DataClientRetriableException - in case of retriable error
    • getDataAsBytes

      byte[] getDataAsBytes(Partition partition)
      Retrieves the blob data associated with the partition as array of bytes

      Parameters:
      partition - the partition to retrieve
      Returns:
      blob data associated with the partition as array of bytes
      Throws:
      NotFoundException - when the partition doesn't have associated payload (e.g. for expired volatile data)
      DataClientNonRetriableException - in case of non-retriable error
      DataClientRetriableException - in case of retriable error
      Note:
      This method could be used only for downloading data less than 2GB
    • getObjectDataAsBytes2

      byte[] getObjectDataAsBytes2(String layerId, String key, boolean applyDecompression, ByteRange range)
      Retrieves the blob data associated with provided key as an Array of bytes.

      Parameters:
      layerId - the id of the layer
      key - the key of the object to get data for
      applyDecompression - decides whether decompression is applied for the object data.
      range - the range of bytes to retrieve
      Returns:
      Blob data associated with key as an Array of bytes.
      Throws:
      UnsupportedOperationException - in case method called for non-objectstore layer
      NotFoundException - in case of the key doesn't exist
      DataClientNonRetriableException - in case of non-retriable error
      DataClientRetriableException - in case of retriable error
    • getObjectMetadata

      ObjectMetadata getObjectMetadata(String layerId, String key)
      Retrieves metadata of the key provided in request

      Parameters:
      layerId - the id of the layer
      key - the key for which metadata is requested
      Returns:
      metadata associated with the specified key
      Throws:
      UnsupportedOperationException - in case method called for non-objectstore layer
      DataClientNonRetriableException - in case of non-retriable error
      DataClientRetriableException - in case of retriable error
      NotFoundException - in case of the key doesn't exist
    • listObjects

      List<ObjectStoreListItem> listObjects(String layerId, String parent)
      Retrieves List of elements under the provided parent key at one level of depth.

      If no parent key is provided, root of the layer is used as default key.

      Parameters:
      layerId - the id of the layer
      parent - the key under which listing items are requested. Empty String or Null value means root is requested.
      Returns:
      List of elements under specified parent.
      Throws:
      UnsupportedOperationException - in case method called for non-objectstore layer
      DataClientNonRetriableException - in case of non-retriable error
      DataClientRetriableException - in case of retriable error
    • listObjects

      List<ObjectStoreListItem> listObjects(String layerId, String parent, Integer pageSize)
      Retrieves List of elements under the provided parent key at one level of depth.

      If no parent key is provided, root of the layer is used as default key.

      Parameters:
      layerId - the id of the layer
      parent - the key under which listing items are requested. Empty String or Null value means root is requested.
      pageSize - the number of objects that are fetched internally per request
      Returns:
      List of elements under specified parent.
      Throws:
      UnsupportedOperationException - in case method called for non-objectstore layer
      DataClientNonRetriableException - in case of non-retriable error
      DataClientRetriableException - in case of retriable error