Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2065#discussion_r16511729
  
    --- Diff: 
external/flume-sink/src/main/scala/org/apache/spark/streaming/flume/sink/TransactionProcessor.scala
 ---
    @@ -115,7 +122,7 @@ private class TransactionProcessor(val channel: 
Channel, val seqNum: String,
                       ByteBuffer.wrap(event.getBody)))
                     gotEventsInThisTxn = true
                   case None =>
    -                if (!gotEventsInThisTxn) {
    +                if (!gotEventsInThisTxn && !stopped) {
                       logDebug("Sleeping for " + backOffInterval + " millis as 
no events were read in" +
                         " the current transaction")
                       TimeUnit.MILLISECONDS.sleep(backOffInterval)
    --- End diff --
    
    Since you're changing `shutdownNow()` to `shutdown()` in 
SparkAvroCallbackHandler.scala, I'd suggest creating a dummy object and use 
`Object.wait()` here, and `Object.notifyAll()` in the shutdown method above, so 
that sleeping tasks are woken up.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to