Class PslContinuousReader (0.3.4)

public class PslContinuousReader implements ContinuousReader

Inheritance

java.lang.Object > PslContinuousReader

Implements

org.apache.spark.sql.sources.v2.reader.streaming.ContinuousReader

Constructors

PslContinuousReader(CursorClient cursorClient, MultiPartitionCommitter committer, PartitionSubscriberFactory partitionSubscriberFactory, SubscriptionPath subscriptionPath, FlowControlSettings flowControlSettings, PartitionCountReader partitionCountReader)

public PslContinuousReader(CursorClient cursorClient, MultiPartitionCommitter committer, PartitionSubscriberFactory partitionSubscriberFactory, SubscriptionPath subscriptionPath, FlowControlSettings flowControlSettings, PartitionCountReader partitionCountReader)
Parameters
NameDescription
cursorClientcom.google.cloud.pubsublite.internal.CursorClient
committerMultiPartitionCommitter
partitionSubscriberFactoryPartitionSubscriberFactory
subscriptionPathcom.google.cloud.pubsublite.SubscriptionPath
flowControlSettingscom.google.cloud.pubsublite.cloudpubsub.FlowControlSettings
partitionCountReaderPartitionCountReader

Methods

commit(Offset end)

public void commit(Offset end)
Parameter
NameDescription
endorg.apache.spark.sql.sources.v2.reader.streaming.Offset

deserializeOffset(String json)

public Offset deserializeOffset(String json)
Parameter
NameDescription
jsonString
Returns
TypeDescription
org.apache.spark.sql.sources.v2.reader.streaming.Offset

getStartOffset()

public Offset getStartOffset()
Returns
TypeDescription
org.apache.spark.sql.sources.v2.reader.streaming.Offset

mergeOffsets(PartitionOffset[] offsets)

public Offset mergeOffsets(PartitionOffset[] offsets)
Parameter
NameDescription
offsetsorg.apache.spark.sql.sources.v2.reader.streaming.PartitionOffset[]
Returns
TypeDescription
org.apache.spark.sql.sources.v2.reader.streaming.Offset

needsReconfiguration()

public boolean needsReconfiguration()
Returns
TypeDescription
boolean

planInputPartitions()

public List<InputPartition<InternalRow>> planInputPartitions()
Returns
TypeDescription
List<org.apache.spark.sql.sources.v2.reader.InputPartition<org.apache.spark.sql.catalyst.InternalRow>>

readSchema()

public StructType readSchema()
Returns
TypeDescription
org.apache.spark.sql.types.StructType

setStartOffset(Optional<Offset> start)

public void setStartOffset(Optional<Offset> start)
Parameter
NameDescription
startOptional<org.apache.spark.sql.sources.v2.reader.streaming.Offset>

stop()

public void stop()