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 <[email protected]> Reviewers: Ismael Juma <[email protected]>, Jun Rao <[email protected]>, Ewen Cheslack-Postava <[email protected]> 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 <[email protected]> Authored: Tue Jun 14 11:54:29 2016 -0700 Committer: Ewen Cheslack-Postava <[email protected]> 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) }
