camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/8] git commit: Update to Kafka 0.8.1
Date Thu, 27 Mar 2014 07:01:57 GMT
Repository: camel
Updated Branches:
  refs/heads/master 8bfd1232b -> e135e2efc


Update to Kafka 0.8.1


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

Branch: refs/heads/master
Commit: 0fe4a3d7a1f15dea89ecd6cecd34d74a3fc93f6a
Parents: 06ffb5d
Author: Fabien Chaillou <fabien.chaillou@gmail.com>
Authored: Wed Mar 26 14:11:41 2014 -0400
Committer: Fabien Chaillou <fabien.chaillou@gmail.com>
Committed: Wed Mar 26 14:11:41 2014 -0400

----------------------------------------------------------------------
 .../org/apache/camel/component/kafka/KafkaEndpointTest.java    | 6 +++++-
 .../org/apache/camel/component/kafka/SimplePartitioner.java    | 4 ++--
 parent/pom.xml                                                 | 4 ++--
 3 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0fe4a3d7/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaEndpointTest.java
b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaEndpointTest.java
index 3a59e3e..6ac6f81 100644
--- a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaEndpointTest.java
+++ b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaEndpointTest.java
@@ -18,8 +18,10 @@ package org.apache.camel.component.kafka;
 
 import java.net.URISyntaxException;
 
+import kafka.message.Message;
 import kafka.message.MessageAndMetadata;
 
+import kafka.serializer.DefaultDecoder;
 import org.apache.camel.Exchange;
 import org.junit.Test;
 
@@ -32,8 +34,10 @@ public class KafkaEndpointTest {
     public void testCreatingKafkaExchangeSetsHeaders() throws URISyntaxException {
         KafkaEndpoint endpoint = new KafkaEndpoint("kafka:localhost", "localhost", new KafkaComponent());
 
+        Message message = new Message("mymessage".getBytes(), "somekey".getBytes());
+        DefaultDecoder decoder = new DefaultDecoder(null);
         MessageAndMetadata<byte[], byte[]> mm =
-                new MessageAndMetadata<byte[], byte[]>("somekey".getBytes(), "mymessage".getBytes(),
"topic", 4, 56);
+                new MessageAndMetadata<byte[], byte[]>("topic", 4, message, 56, decoder,
decoder);
 
         Exchange exchange = endpoint.createKafkaExchange(mm);
         assertEquals("somekey", exchange.getIn().getHeader(KafkaConstants.KEY));

http://git-wip-us.apache.org/repos/asf/camel/blob/0fe4a3d7/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/SimplePartitioner.java
----------------------------------------------------------------------
diff --git a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/SimplePartitioner.java
b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/SimplePartitioner.java
index 05eb1e5..039a2e7 100644
--- a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/SimplePartitioner.java
+++ b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/SimplePartitioner.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.kafka;
 import kafka.producer.Partitioner;
 import kafka.utils.VerifiableProperties;
 
-public class SimplePartitioner implements Partitioner<String> {
+public class SimplePartitioner implements Partitioner {
 
     public SimplePartitioner(VerifiableProperties props) {
     }
@@ -31,7 +31,7 @@ public class SimplePartitioner implements Partitioner<String> {
      * @return an integer between 0 and numPartitions-1
      */
     @Override
-    public int partition(String key, int numPartitions) {
+    public int partition(Object key, int numPartitions) {
         return key.hashCode() % numPartitions;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0fe4a3d7/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 61cdb05..a8cf7c5 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -253,8 +253,8 @@
     <junit-bundle-version>4.11_1</junit-bundle-version>
     <junit-version>4.11</junit-version>
     <jython-version>2.5.3</jython-version>
-    <kafka-version>0.8.0</kafka-version>
-    <kafka-bundle-version>0.8.0_1</kafka-bundle-version>
+    <kafka-version>0.8.1</kafka-version>
+    <kafka-bundle-version>0.8.1_1</kafka-bundle-version>
     <karaf-version>2.3.3</karaf-version>
     <kie-version>6.0.0.Final</kie-version>
     <krati-version>0.4.9</krati-version>


Mime
View raw message