kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-1910; missed follow-up changes
Date Wed, 11 Mar 2015 00:31:27 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 01d2a2523 -> 1eb5f53aa


KAFKA-1910; missed follow-up changes


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

Branch: refs/heads/trunk
Commit: 1eb5f53aa4f5c5c0f67ce62d86e8d9b4e5bbc500
Parents: 01d2a25
Author: Guozhang Wang <wangguoz@gmail.com>
Authored: Tue Mar 10 17:31:17 2015 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Tue Mar 10 17:31:17 2015 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/kafka/common/record/MemoryRecords.java    | 2 +-
 .../kafka/clients/producer/internals/RecordAccumulatorTest.java    | 1 -
 core/src/test/scala/integration/kafka/api/ConsumerTest.scala       | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/1eb5f53a/clients/src/main/java/org/apache/kafka/common/record/MemoryRecords.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/record/MemoryRecords.java b/clients/src/main/java/org/apache/kafka/common/record/MemoryRecords.java
index d20a2e4..c049bff 100644
--- a/clients/src/main/java/org/apache/kafka/common/record/MemoryRecords.java
+++ b/clients/src/main/java/org/apache/kafka/common/record/MemoryRecords.java
@@ -163,7 +163,7 @@ public class MemoryRecords implements Records {
         if (writable)
             throw new IllegalStateException("The memory records need to be closed for write
before rewinding for read");
 
-        return (ByteBuffer) buffer.duplicate().flip();
+        return (ByteBuffer) buffer.flip();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/kafka/blob/1eb5f53a/clients/src/test/java/org/apache/kafka/clients/producer/internals/RecordAccumulatorTest.java
----------------------------------------------------------------------
diff --git a/clients/src/test/java/org/apache/kafka/clients/producer/internals/RecordAccumulatorTest.java
b/clients/src/test/java/org/apache/kafka/clients/producer/internals/RecordAccumulatorTest.java
index 7b3fb1d..e379ac8 100644
--- a/clients/src/test/java/org/apache/kafka/clients/producer/internals/RecordAccumulatorTest.java
+++ b/clients/src/test/java/org/apache/kafka/clients/producer/internals/RecordAccumulatorTest.java
@@ -59,7 +59,6 @@ public class RecordAccumulatorTest {
     private int msgSize = Records.LOG_OVERHEAD + Record.recordSize(key, value);
     private Cluster cluster = new Cluster(Arrays.asList(node1, node2), Arrays.asList(part1,
part2, part3));
     private Metrics metrics = new Metrics(time);
-    String metricGroup = "TestMetrics";
     Map<String, String> metricTags = new LinkedHashMap<String, String>();
 
     @Test

http://git-wip-us.apache.org/repos/asf/kafka/blob/1eb5f53a/core/src/test/scala/integration/kafka/api/ConsumerTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/integration/kafka/api/ConsumerTest.scala b/core/src/test/scala/integration/kafka/api/ConsumerTest.scala
index ef59ed9..fed37e3 100644
--- a/core/src/test/scala/integration/kafka/api/ConsumerTest.scala
+++ b/core/src/test/scala/integration/kafka/api/ConsumerTest.scala
@@ -286,7 +286,7 @@ class ConsumerTest extends IntegrationTestHarness with Logging {
       for (record <- consumer.poll(50))
         records.add(record)
       if(iters > maxIters)
-        throw new IllegalStateException("Failed to consume the expected records after " +
iters + " iterations.");
+        throw new IllegalStateException("Failed to consume the expected records after " +
iters + " iterations.")
       iters += 1
     }
     for (i <- 0 until numRecords) {


Mime
View raw message