Skip to content

Commit

Permalink
[SPARK-26241][SQL] Add queryId to IncrementalExecution
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?
This is a small change for better debugging: to pass query uuid in IncrementalExecution, when we look at the QueryExecution in isolation to trace back the query.

## How was this patch tested?
N/A - just add some field for better debugging.

Closes apache#23192 from rxin/SPARK-26241.

Authored-by: Reynold Xin <rxin@databricks.com>
Signed-off-by: gatorsmile <gatorsmile@gmail.com>
  • Loading branch information
rxin authored and gatorsmile committed Dec 2, 2018
1 parent 55c9685 commit cbb9bb9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ case class ExplainCommand(
// output mode does not matter since there is no `Sink`.
new IncrementalExecution(
sparkSession, logicalPlan, OutputMode.Append(), "<unknown>",
UUID.randomUUID, 0, OffsetSeqMetadata(0, 0))
UUID.randomUUID, UUID.randomUUID, 0, OffsetSeqMetadata(0, 0))
} else {
sparkSession.sessionState.executePlan(logicalPlan)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class IncrementalExecution(
logicalPlan: LogicalPlan,
val outputMode: OutputMode,
val checkpointLocation: String,
val queryId: UUID,
val runId: UUID,
val currentBatchId: Long,
val offsetSeqMetadata: OffsetSeqMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ class MicroBatchExecution(
triggerLogicalPlan,
outputMode,
checkpointFile("state"),
id,
runId,
currentBatchId,
offsetSeqMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class ContinuousExecution(
withSink,
outputMode,
checkpointFile("state"),
id,
runId,
currentBatchId,
offsetSeqMetadata)
Expand Down

0 comments on commit cbb9bb9

Please sign in to comment.