From 14630aaf06892494ade308c93ab1d18b3d8d5207 Mon Sep 17 00:00:00 2001 From: Tathagata Das Date: Thu, 13 Nov 2014 13:51:42 -0800 Subject: [PATCH] Minor updates. --- .../spark/streaming/kafka/ReliableKafkaReceiver.scala | 2 +- .../apache/spark/streaming/receiver/BlockGenerator.scala | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/external/kafka/src/main/scala/org/apache/spark/streaming/kafka/ReliableKafkaReceiver.scala b/external/kafka/src/main/scala/org/apache/spark/streaming/kafka/ReliableKafkaReceiver.scala index f85296efe8d60..09c3d1c4549e7 100644 --- a/external/kafka/src/main/scala/org/apache/spark/streaming/kafka/ReliableKafkaReceiver.scala +++ b/external/kafka/src/main/scala/org/apache/spark/streaming/kafka/ReliableKafkaReceiver.scala @@ -227,7 +227,7 @@ class ReliableKafkaReceiver[ ZkUtils.updatePersistentPath(zkClient, zkPath, offset.toString) } catch { - case t: Throwable => logWarning(s"Exception during commit offset $offset for topic" + + case e: Exception => logWarning(s"Exception during commit offset $offset for topic" + s"${topicAndPart.topic}, partition ${topicAndPart.partition}", t) } diff --git a/streaming/src/main/scala/org/apache/spark/streaming/receiver/BlockGenerator.scala b/streaming/src/main/scala/org/apache/spark/streaming/receiver/BlockGenerator.scala index d286fadd50096..55765dc90698b 100644 --- a/streaming/src/main/scala/org/apache/spark/streaming/receiver/BlockGenerator.scala +++ b/streaming/src/main/scala/org/apache/spark/streaming/receiver/BlockGenerator.scala @@ -140,8 +140,8 @@ private[streaming] class BlockGenerator( } catch { case ie: InterruptedException => logInfo("Block updating timer thread was interrupted") - case t: Throwable => - reportError("Error in block updating thread", t) + case e: Exception => + reportError("Error in block updating thread", e) } } @@ -168,7 +168,7 @@ private[streaming] class BlockGenerator( case ie: InterruptedException => logInfo("Block pushing thread was interrupted") case e: Exception => - reportError("Error in block updating thread", e) + reportError("Error in block pushing thread", e) } }