Skip to content

Commit

Permalink
[SPARK-19891][SS] Await Batch Lock notified on stream execution exit
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?

We need to notify the await batch lock when the stream exits early e.g., when an exception has been thrown.

## How was this patch tested?

Current tests that throw exceptions at runtime will finish faster as a result of this update.

zsxwing

Please review http://spark.apache.org/contributing.html before opening a pull request.

Author: Tyson Condie <tcondie@gmail.com>

Closes #17231 from tcondie/kafka-writer.
  • Loading branch information
tcondie authored and zsxwing committed Mar 10, 2017
1 parent 5949e6c commit 501b711
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,13 @@ class StreamExecution(
}
}
} finally {
awaitBatchLock.lock()
try {
// Wake up any threads that are waiting for the stream to progress.
awaitBatchLockCondition.signalAll()
} finally {
awaitBatchLock.unlock()
}
terminationLatch.countDown()
}
}
Expand Down

0 comments on commit 501b711

Please sign in to comment.