Interface FlinkReadEngine
- All Known Implementing Classes:
FlinkReadEngineImpl
public interface FlinkReadEngine
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.api.common.functions.MapFunction<Partition,byte[]> Retrieves an flink map function that download data for each partition.byte[]getDataAsBytes(Partition partition) Retrieves the blob data associated with the partition as array of bytesbyte[]getObjectDataAsBytes2(String layerId, String key, boolean applyDecompression, ByteRange range) Retrieves the blob data associated with provided key as an Array of bytes.getObjectMetadata(String layerId, String key) Retrieves metadata of the key provided in requestlistObjects(String layerId, String parent) Retrieves List of elements under the provided parent key at one level of depth.listObjects(String layerId, String parent, Integer pageSize) Retrieves List of elements under the provided parent key at one level of depth.
-
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 errorDataClientRetriableException- in case of retriable error
-
getDataAsBytes
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 errorDataClientRetriableException- 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 layerkey- the key of the object to get data forapplyDecompression- 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 layerNotFoundException- in case of the key doesn't existDataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
getObjectMetadata
Retrieves metadata of the key provided in request- Parameters:
layerId- the id of the layerkey- the key for which metadata is requested- Returns:
- metadata associated with the specified key
- Throws:
UnsupportedOperationException- in case method called for non-objectstore layerDataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable errorNotFoundException- in case of the key doesn't exist
-
listObjects
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 layerparent- 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 layerDataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
listObjects
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 layerparent- 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 layerDataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-