You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by td...@apache.org on 2015/01/11 00:35:48 UTC

spark git commit: [SPARK-5181] do not print writing WAL log when WAL is disabled

Repository: spark
Updated Branches:
  refs/heads/master 0ca51cc31 -> f0d558b6e


[SPARK-5181] do not print writing WAL log when WAL is disabled

https://issues.apache.org/jira/browse/SPARK-5181

Currently, even the logManager is not created, we still see the log entry
s"Writing to log $record"

a simple fix to make log more accurate

Author: CodingCat <zh...@gmail.com>

Closes #3985 from CodingCat/SPARK-5181 and squashes the following commits:

0e27dc5 [CodingCat] do not print writing WAL log when WAL is disabled


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f0d558b6
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f0d558b6
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f0d558b6

Branch: refs/heads/master
Commit: f0d558b6e6ec0c97280d5844c98fb92c24954cbb
Parents: 0ca51cc
Author: CodingCat <zh...@gmail.com>
Authored: Sat Jan 10 15:35:41 2015 -0800
Committer: Tathagata Das <ta...@gmail.com>
Committed: Sat Jan 10 15:35:41 2015 -0800

----------------------------------------------------------------------
 .../spark/streaming/scheduler/ReceivedBlockTracker.scala       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/f0d558b6/streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceivedBlockTracker.scala
----------------------------------------------------------------------
diff --git a/streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceivedBlockTracker.scala b/streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceivedBlockTracker.scala
index 2ce458c..c3d9d7b 100644
--- a/streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceivedBlockTracker.scala
+++ b/streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceivedBlockTracker.scala
@@ -203,9 +203,11 @@ private[streaming] class ReceivedBlockTracker(
 
   /** Write an update to the tracker to the write ahead log */
   private def writeToLog(record: ReceivedBlockTrackerLogEvent) {
-    logDebug(s"Writing to log $record")
-    logManagerOption.foreach { logManager =>
+    if (isLogManagerEnabled) {
+      logDebug(s"Writing to log $record")
+      logManagerOption.foreach { logManager =>
         logManager.writeToLog(ByteBuffer.wrap(Utils.serialize(record)))
+      }
     }
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org