Class NewPartition
java.lang.Object
com.here.platform.data.client.javadsl.NewPartition
- All Implemented Interfaces:
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDefines a blob which contents are buffered and that can be read multiple times.static final classBuild a new partition to be committedstatic classSets the data source to be a byte array.static classstatic classSets the data source from file.static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract scala.Option<String>Deprecated.This field is not supported anymore.The checksum field is optional.abstract OptionalLongOptional value for the size of the compressed partition data in bytes.getCrc()The crc field is optional.abstract com.here.platform.data.client.scaladsl.NewPartition.BlobgetData()Data of partition.abstract OptionalLongOptional value for the uncompressed size of the partition data in bytes.abstract Optional<Map<String,IndexValue>> Optional value for index fields.Optional user-defined fields that can store extra metadata about this index record.abstract OptionalLongOptional value for the stream record timestampMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.here.platform.data.client.model.PendingPartition
getLayer, getPartition, layer, partition
-
Constructor Details
-
NewPartition
public NewPartition()
-
-
Method Details
-
getData
public abstract com.here.platform.data.client.scaladsl.NewPartition.Blob getData()Data of partition. -
getFields
Optional value for index fields. It's collection of name-value pairs used to index partition in Index layer. -
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
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
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
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
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
Optional value for the stream record timestamp -
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
-