aboutsummaryrefslogtreecommitdiff
path: root/streaming
diff options
context:
space:
mode:
authorCodingCat <zhunansjtu@gmail.com>2015-01-10 15:35:41 -0800
committerTathagata Das <tathagata.das1565@gmail.com>2015-01-10 15:36:05 -0800
commitf04ff9d37ae312dccd16843df7d0e3a03c30e403 (patch)
tree1f8694e329199c42abdda786b842705b84b455b5 /streaming
parentcce003d7533f8c767e9f7350f869b1ac7bb3ac22 (diff)
downloadspark-f04ff9d37ae312dccd16843df7d0e3a03c30e403.tar.gz
spark-f04ff9d37ae312dccd16843df7d0e3a03c30e403.tar.bz2
spark-f04ff9d37ae312dccd16843df7d0e3a03c30e403.zip
[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 <zhunansjtu@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 (cherry picked from commit f0d558b6e6ec0c97280d5844c98fb92c24954cbb) Signed-off-by: Tathagata Das <tathagata.das1565@gmail.com>
Diffstat (limited to 'streaming')
-rw-r--r--streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceivedBlockTracker.scala6
1 files changed, 4 insertions, 2 deletions
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 2ce458cdde..c3d9d7b681 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)))
+ }
}
}