PayloadWithMetadata Class

On This Page
Fully Qualified Name

org.apache.spark.streaming.v3io.PayloadWithMetadata

Description

A case class that contains decoded stream record data and related metadata.

Summary

Instance Constructors

case class PayloadWithMetadata[V](
    topicName:      String = "",
    partitionId:    Short = -1,
    createTimeMs:   Long = -1,
    createTimeNano: Long = -1,
    recordKey:      Long = -1,
    payload:        V = null.asInstanceOf[V])

Instance Constructors

Syntax

PayloadWithMetadata[V](
    topicName:      String,
    partitionId:    Short,
    createTimeMs:   Long,
    createTimeNano: Long,
    recordKey:      Long1,
    payload:        V)

Parameters and Data Members

Note
The parameters have default initialization values (such as -1), but any parameter that is intended to be used must be set explicitly. The RecordAndMetadata.payloadWithMetadata method sets all parameters for the returned object.
topicName

The name of the stream that contains the record.

  • Type: String
partitionId

The ID of the stream shard that contains the record (see Stream Sharding and Partitioning).

  • Type: Short
createTimeMs

The record's ingestion time (the time at which the record arrived at the platform), as a Unix timestamp in milliseconds. For example, 1511260205000 indicates that the record was ingested on 21 Nov 2017 at 10:30:05 AM. The createTimeNano parameter holds the nanoseconds unit of the ingestion time.

  • Type: Long
createTimeNano

The nanoseconds unit of the createTimeMs ingestion-time timestamp. For example, if createTimeMs is 1511260205000 and createTimeNano is 500000000, the record was ingested on 21 Nov 2017 at 10:30 AM and 5.5 seconds.

  • Type: Long
recordKey

The record's sequence number (see Stream Record Consumption).

  • Type: Long
payload

Decoded record data, formatted as the value type of the current class instance (V).

  • Type: V

Type Parameters

  • V — the data type into which to convert the record's data payload ("value").