public class EsCommitProtocol extends Object implements scala.Serializable
Constructor and Description |
---|
EsCommitProtocol(org.apache.spark.sql.execution.streaming.MetadataLog<EsSinkStatus[]> commitLog) |
Modifier and Type | Method and Description |
---|---|
void |
abortJob(JobState jobState)
Abort this job execution.
|
void |
abortTask(TaskState taskState)
Abort this task execution
|
void |
commitJob(JobState jobState,
scala.collection.Seq<TaskCommit> taskCommits)
Commit the results of each of the tasks to the execution log.
|
org.apache.spark.sql.execution.streaming.MetadataLog<EsSinkStatus[]> |
commitLog() |
TaskCommit |
commitTask(TaskState taskState)
Commit this task's transaction.
|
long |
executionStart() |
void |
initJob(JobState jobState)
Prepare the driver side of the commit protocol.
|
void |
initTask(TaskState taskState)
Initialize the executor side of the commit protocol.
|
Log |
logger() |
void |
recordSeen()
Signal that a record has been processed in this transaction.
|
long |
recordsWritten() |
public EsCommitProtocol(org.apache.spark.sql.execution.streaming.MetadataLog<EsSinkStatus[]> commitLog)
public void abortJob(JobState jobState)
jobState
- the current Job informationpublic void abortTask(TaskState taskState)
taskState
- the current Task informationpublic void commitJob(JobState jobState, scala.collection.Seq<TaskCommit> taskCommits)
jobState
- the current Job informationtaskCommits
- the results from each of the taskspublic org.apache.spark.sql.execution.streaming.MetadataLog<EsSinkStatus[]> commitLog()
public TaskCommit commitTask(TaskState taskState)
taskState
- the current Task informationpublic long executionStart()
public void initJob(JobState jobState)
jobState
- the current Job informationpublic void initTask(TaskState taskState)
taskState
- the current Task informationpublic Log logger()
public void recordSeen()
public long recordsWritten()