kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: KAFKA-3762 Log.loadSegments() should log the message in exception
Date Tue, 14 Jun 2016 18:54:37 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk b1ba54025 -> 7cc6e0e2d


KAFKA-3762 Log.loadSegments() should log the message in exception

Adding an error logging message in Log.loadSegments() in the case when an index file corresponding
to a log file exists but an exception is thrown.

Signed-off-by: Ishita Mandhan <imandhaus.ibm.com>

Author: Ishita Mandhan <imandha@us.ibm.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Jun Rao <junrao@gmail.com>, Ewen Cheslack-Postava
<ewen@confluent.io>

Closes #1480 from imandhan/KAFKA-3762


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

Branch: refs/heads/trunk
Commit: 7cc6e0e2d376c2504cf6fafd69ccd30f4c03f31f
Parents: b1ba540
Author: Ishita Mandhan <imandha@us.ibm.com>
Authored: Tue Jun 14 11:54:29 2016 -0700
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Tue Jun 14 11:54:29 2016 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/log/Log.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/7cc6e0e2/core/src/main/scala/kafka/log/Log.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/log/Log.scala b/core/src/main/scala/kafka/log/Log.scala
index 76cd86e..1a7719a 100644
--- a/core/src/main/scala/kafka/log/Log.scala
+++ b/core/src/main/scala/kafka/log/Log.scala
@@ -194,7 +194,7 @@ class Log(val dir: File,
               segment.index.sanityCheck()
           } catch {
             case e: java.lang.IllegalArgumentException =>
-              warn("Found a corrupted index file, %s, deleting and rebuilding index...".format(indexFile.getAbsolutePath))
+              warn("Found a corrupted index file, %s, deleting and rebuilding index. Error
Message: %s".format(indexFile.getAbsolutePath, e.getMessage))
               indexFile.delete()
               segment.recover(config.maxMessageSize)
           }


Mime
View raw message