Interface FlinkWriteEngine
- All Known Implementing Classes:
FlinkWriteEngineImpl
public interface FlinkWriteEngine
-
Method Summary
Modifier and TypeMethodDescriptionblobChecksum(String layer, com.here.platform.data.client.scaladsl.NewPartition.BufferedBlob blob) Computes a blob's checksum based on its layer configuration.Computes a blob's crc based on its layer configuration.voidcopyObject(String layerId, String key, String sourceKey) Copies object from one location to othervoiddeleteObject(String layerId, String key) Deletes the specified object from object store.org.apache.flink.api.connector.sink2.Sink<PendingPartition>publish()Publish new partitions to a catalog.put(PendingPartition partition) Adds the selected partition to the underlying blobstorevoidupdateObjectTtl(String layerId, String key, long ttlSeconds) Updates the TTL for the object stored in Volatile LayervoiduploadIMLFeatureCollection(String layer, FeatureCollection featureCollection, OptionalInt batchSize) Upload a large FeatureCollection to the Interactive Map LayervoiduploadObject2(String layerId, String key, com.here.platform.data.client.scaladsl.NewPartition.Blob blob, Optional<String> contentType, Optional<ContentEncoding> contentEncoding) Uploads the specified object to object store
-
Method Details
-
blobChecksum
Optional<String> blobChecksum(String layer, com.here.platform.data.client.scaladsl.NewPartition.BufferedBlob blob) Computes a blob's checksum based on its layer configuration.The algorithm used is defined accordingly to the layer's configuration. If the layer doesn't have the respective field set, then an empty optional is returned.
- Parameters:
layer- the layer that the specified blob is associated to.blob- the blob that will have its checksum computed.- Returns:
- a checksum or empty if the layer's configuration field is not set.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
blobCrc
Optional<String> blobCrc(String layer, com.here.platform.data.client.scaladsl.NewPartition.BufferedBlob blob) Computes a blob's crc based on its layer configuration.The algorithm used is defined accordingly to the layer's configuration. If the layer doesn't have the respective field set, then an empty optional is returned.
- Parameters:
layer- the layer that the specified blob is associated to.blob- the blob that will have its crc computed.- Returns:
- a crc or empty if the layer's configuration field is not set.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
copyObject
Copies object from one location to other- Parameters:
layerId- the id of the layerkey- the key of the destination objectsourceKey- the key of the source object- Throws:
UnsupportedOperationException- in case method called for non-objectstore layerDataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
deleteObject
Deletes the specified object from object store.- Parameters:
layerId- the id of the layerkey- the key of the object to be deleted- Throws:
UnsupportedOperationException- in case method called for non-objectstore layerDataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
publish
org.apache.flink.api.connector.sink2.Sink<PendingPartition> publish()Publish new partitions to a catalog.This method can be used to publish new partitions to stream layer.
- Returns:
- a sink which all partitions are published to server.
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
put
Adds the selected partition to the underlying blobstore- Parameters:
partition- the partition to add- Returns:
- a partition that could be committed
- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
updateObjectTtl
Updates the TTL for the object stored in Volatile Layer- Parameters:
layerId- the id of the layerkey- the key of the target objectttlSeconds- new value of ttl for the object- Throws:
UnsupportedOperationException- in case method called for non-volatile layerDataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
uploadIMLFeatureCollection
void uploadIMLFeatureCollection(String layer, FeatureCollection featureCollection, OptionalInt batchSize) Upload a large FeatureCollection to the Interactive Map Layer- Parameters:
layer- the id of the layerfeatureCollection- the FeatureCollection to uploadbatchSize- the number of features in an upload batch- Throws:
DataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-
uploadObject2
void uploadObject2(String layerId, String key, com.here.platform.data.client.scaladsl.NewPartition.Blob blob, Optional<String> contentType, Optional<ContentEncoding> contentEncoding) Uploads the specified object to object store- Parameters:
layerId- the id of the layerkey- the key of the object to be uploadedblob- the blob of data that is to be uploadedcontentType- the optional content-type of the objectcontentEncoding- the optional content-encoding of the object- Throws:
UnsupportedOperationException- in case method called for non-objectstore layerDataClientNonRetriableException- in case of non-retriable errorDataClientRetriableException- in case of retriable error
-