Class SparkSourceOffset (0.3.4)

public final class SparkSourceOffset extends Offset

Inheritance

java.lang.Object > org.apache.spark.sql.execution.streaming.Offset > org.apache.spark.sql.sources.v2.reader.streaming.Offset > SparkSourceOffset

Constructors

SparkSourceOffset(Map<Partition,SparkPartitionOffset> map)

public SparkSourceOffset(Map<Partition,SparkPartitionOffset> map)
Parameter
NameDescription
mapMap<com.google.cloud.pubsublite.Partition,com.google.cloud.pubsublite.spark.SparkPartitionOffset>

Methods

fromJson(String json)

public static SparkSourceOffset fromJson(String json)
Parameter
NameDescription
jsonString
Returns
TypeDescription
SparkSourceOffset

getPartitionOffsetMap()

public Map<Partition,SparkPartitionOffset> getPartitionOffsetMap()
Returns
TypeDescription
Map<com.google.cloud.pubsublite.Partition,com.google.cloud.pubsublite.spark.SparkPartitionOffset>

json()

public String json()
Returns
TypeDescription
String
Overrides
org.apache.spark.sql.sources.v2.reader.streaming.Offset.json()

merge(SparkPartitionOffset[] offsets)

public static SparkSourceOffset merge(SparkPartitionOffset[] offsets)
Parameter
NameDescription
offsetscom.google.cloud.pubsublite.spark.SparkPartitionOffset[]
Returns
TypeDescription
SparkSourceOffset

merge(SparkSourceOffset o1, SparkSourceOffset o2)

public static SparkSourceOffset merge(SparkSourceOffset o1, SparkSourceOffset o2)
Parameters
NameDescription
o1SparkSourceOffset
o2SparkSourceOffset
Returns
TypeDescription
SparkSourceOffset