-
-
Save yjshen/36987b6ca6c711fa340e242957cbad05 to your computer and use it in GitHub Desktop.
Source and Sink API in Spark Structured Streaming.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Source { | |
def schema: StructType | |
def getOffset: Option[Offset] | |
def getBatch(start: Option[Offset], end: Offset): DataFrame | |
def commit(end: Offset): Unit | |
def stop(): Unit | |
} | |
trait Sink { | |
def addBatch(batchId: Long, data: DataFrame): Unit | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment