Interface FlinkWriteEngine

All Known Implementing Classes:
FlinkWriteEngineImpl

public interface FlinkWriteEngine
  • 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 error
      DataClientRetriableException - 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 error
      DataClientRetriableException - in case of retriable error
    • copyObject

      void copyObject(String layerId, String key, String sourceKey)
      Copies object from one location to other

      Parameters:
      layerId - the id of the layer
      key - the key of the destination object
      sourceKey - the key of the source object
      Throws:
      UnsupportedOperationException - in case method called for non-objectstore layer
      DataClientNonRetriableException - in case of non-retriable error
      DataClientRetriableException - in case of retriable error
    • deleteObject

      void deleteObject(String layerId, String key)
      Deletes the specified object from object store.

      Parameters:
      layerId - the id of the layer
      key - the key of the object to be deleted
      Throws:
      UnsupportedOperationException - in case method called for non-objectstore layer
      DataClientNonRetriableException - in case of non-retriable error
      DataClientRetriableException - 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 error
      DataClientRetriableException - 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 error
      DataClientRetriableException - in case of retriable error
    • updateObjectTtl

      void updateObjectTtl(String layerId, String key, long ttlSeconds)
      Updates the TTL for the object stored in Volatile Layer

      Parameters:
      layerId - the id of the layer
      key - the key of the target object
      ttlSeconds - new value of ttl for the object
      Throws:
      UnsupportedOperationException - in case method called for non-volatile layer
      DataClientNonRetriableException - in case of non-retriable error
      DataClientRetriableException - 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 layer
      featureCollection - the FeatureCollection to upload
      batchSize - the number of features in an upload batch
      Throws:
      DataClientNonRetriableException - in case of non-retriable error
      DataClientRetriableException - 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 layer
      key - the key of the object to be uploaded
      blob - the blob of data that is to be uploaded
      contentType - the optional content-type of the object
      contentEncoding - the optional content-encoding of the object
      Throws:
      UnsupportedOperationException - in case method called for non-objectstore layer
      DataClientNonRetriableException - in case of non-retriable error
      DataClientRetriableException - in case of retriable error