kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject kafka git commit: kafka-2290; OffsetIndex should open RandomAccessFile consistently; patched by Chris Black; reviewed by Jun Rao
Date Mon, 22 Jun 2015 15:59:13 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 16ecf9806 -> cf28f8939


kafka-2290; OffsetIndex should open RandomAccessFile consistently; patched by Chris Black;
reviewed by Jun Rao


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

Branch: refs/heads/trunk
Commit: cf28f893963c363bca43747e2f37fad3bb67d033
Parents: 16ecf98
Author: Chris Black <chrisbblack@gmail.om>
Authored: Mon Jun 22 08:59:05 2015 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Mon Jun 22 08:59:05 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/kafka/blob/cf28f893/core/src/main/scala/kafka/log/OffsetIndex.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/log/OffsetIndex.scala b/core/src/main/scala/kafka/log/OffsetIndex.scala
index a1082ae..332d5e2 100755
--- a/core/src/main/scala/kafka/log/OffsetIndex.scala
+++ b/core/src/main/scala/kafka/log/OffsetIndex.scala
@@ -274,7 +274,7 @@ class OffsetIndex(@volatile var file: File, val baseOffset: Long, val
maxIndexSi
    */
   def resize(newSize: Int) {
     inLock(lock) {
-      val raf = new RandomAccessFile(file, "rws")
+      val raf = new RandomAccessFile(file, "rw")
       val roundedNewSize = roundToExactMultiple(newSize, 8)
       val position = this.mmap.position
       


Mime
View raw message