Class FlinkWriteEngineImpl
java.lang.Object
com.here.platform.data.client.flink.javadsl.FlinkWriteEngineImpl
- All Implemented Interfaces:
FlinkWriteEngine
-
Constructor Summary
ConstructorsConstructorDescriptionFlinkWriteEngineImpl(HRN hrn, Settings settings, scala.Function0<com.here.platform.data.client.engine.scaladsl.WriteEngine> toCreateWriteEngine, DataClientFlinkContext context) -
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
-
Constructor Details
-
FlinkWriteEngineImpl
public FlinkWriteEngineImpl(HRN hrn, Settings settings, scala.Function0<com.here.platform.data.client.engine.scaladsl.WriteEngine> toCreateWriteEngine, DataClientFlinkContext context)
-
-
Method Details
-
blobChecksum
public Optional<String> blobChecksum(String layer, com.here.platform.data.client.scaladsl.NewPartition.BufferedBlob blob) Description copied from interface:FlinkWriteEngineComputes 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.
- Specified by:
blobChecksumin interfaceFlinkWriteEngine- 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.
-
blobCrc
public Optional<String> blobCrc(String layer, com.here.platform.data.client.scaladsl.NewPartition.BufferedBlob blob) Description copied from interface:FlinkWriteEngineComputes 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.
- Specified by:
blobCrcin interfaceFlinkWriteEngine- 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.
-
copyObject
Description copied from interface:FlinkWriteEngineCopies object from one location to other- Specified by:
copyObjectin interfaceFlinkWriteEngine- Parameters:
layerId- the id of the layerkey- the key of the destination objectsourceKey- the key of the source object
-
deleteObject
Description copied from interface:FlinkWriteEngineDeletes the specified object from object store.- Specified by:
deleteObjectin interfaceFlinkWriteEngine- Parameters:
layerId- the id of the layerkey- the key of the object to be deleted
-
publish
Description copied from interface:FlinkWriteEnginePublish new partitions to a catalog.This method can be used to publish new partitions to stream layer.
- Specified by:
publishin interfaceFlinkWriteEngine- Returns:
- a sink which all partitions are published to server.
-
put
Description copied from interface:FlinkWriteEngineAdds the selected partition to the underlying blobstore- Specified by:
putin interfaceFlinkWriteEngine- Parameters:
partition- the partition to add- Returns:
- a partition that could be committed
-
updateObjectTtl
Description copied from interface:FlinkWriteEngineUpdates the TTL for the object stored in Volatile Layer- Specified by:
updateObjectTtlin interfaceFlinkWriteEngine- Parameters:
layerId- the id of the layerkey- the key of the target objectttlSeconds- new value of ttl for the object
-
uploadIMLFeatureCollection
public void uploadIMLFeatureCollection(String layer, FeatureCollection featureCollection, OptionalInt batchSize) Description copied from interface:FlinkWriteEngineUpload a large FeatureCollection to the Interactive Map Layer- Specified by:
uploadIMLFeatureCollectionin interfaceFlinkWriteEngine- Parameters:
layer- the id of the layerfeatureCollection- the FeatureCollection to uploadbatchSize- the number of features in an upload batch
-
uploadObject2
public void uploadObject2(String layerId, String key, com.here.platform.data.client.scaladsl.NewPartition.Blob blob, Optional<String> contentType, Optional<ContentEncoding> contentEncoding) Description copied from interface:FlinkWriteEngineUploads the specified object to object store- Specified by:
uploadObject2in interfaceFlinkWriteEngine- 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
-