Class NewPartition

java.lang.Object
com.here.platform.data.client.javadsl.NewPartition
All Implemented Interfaces:
PendingPartition

public abstract class NewPartition extends Object implements PendingPartition

Represents a new (or changed) partition pending for commit.

Use the NewPartition.Builder or DeletedPartition.Builder to construct instances of this class.

NewPartition objects encapsulate the following properties

  • layer name, required
  • partition id, required
  • data, required, a byte array, a file, or an input stream, etc.
  • fields, optional, key-value pairs used to index partition in index layer
  • metadata, optional user-defined fields that can store extra metadata about this index record. A typical example of extra metadata is the ingestion time of a record, Map("ingestionTime" -> "1532018660873")
  • checksum, optional, computed while uploading data to blobstore
  • crc, optional, computed while uploading data to blobstore
  • dataSize, optional, computed while uploading data to blobstore
  • compressedDataSize, optional, computed while uploading data to blobstore if layer is using compression
  • timestamp, optional, the stream record timestamp
  • Constructor Details

    • NewPartition

      public NewPartition()
  • Method Details

    • getData

      public abstract com.here.platform.data.client.scaladsl.NewPartition.Blob getData()
      Data of partition.
    • getFields

      public abstract Optional<Map<String,IndexValue>> getFields()
      Optional value for index fields. It's collection of name-value pairs used to index partition in Index layer.
    • getMetadata

      public abstract Optional<Map<String,String>> getMetadata()
      Optional user-defined fields that can store extra metadata about this index record. A typical example of extra metadata is the ingestion time of a record, Map("ingestionTime" -> "1532018660873")
    • getChecksum

      public abstract Optional<String> getChecksum()
      The checksum field is optional. It is only included if checksum was requested in the API call (using 'additionalFields' query parameter) and if a checksum was provided during publish of the partition. It should be set to the sha1 checksum of the data content if data comparison needs to work for this catalog. The maximum length of checksum field is 128 characters.
    • getCrc

      public abstract Optional<String> getCrc()
      The crc field is optional. It is only included if crc was requested in the API call (using 'additionalFields' query parameter) and if a crc was provided during publish of the partition.
    • getDataSize

      public abstract OptionalLong getDataSize()
      Optional value for the uncompressed size of the partition data in bytes. It is only included if the dataSize field was requested in the API call, and if a dataSize was provided during publish of the partition.
    • getCompressedDataSize

      public abstract OptionalLong getCompressedDataSize()
      Optional value for the size of the compressed partition data in bytes. It is only included if the compressedDataSize field was requested in the API call, and if a compressedDataSize was provided during publish of the partition.
    • getTimestamp

      public abstract OptionalLong getTimestamp()
      Optional value for the stream record timestamp
    • additionalMetadata

      public abstract scala.Option<String> additionalMetadata()
      Deprecated.
      This field is not supported anymore. Please use the other available fields instead. Since OLP SDK > 2.1.
      Optional value for additional metadata