pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject [incubator-pulsar] branch branch-2.1 updated: Revert "Kinesis-sink consider topic-name as partition-key if record key empty (#2372)"
Date Mon, 27 Aug 2018 18:48:09 GMT
This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 9ede4c8  Revert "Kinesis-sink consider topic-name as partition-key if record key
empty (#2372)"
9ede4c8 is described below

commit 9ede4c80802626065f70fb5e20b81bafb6f33969
Author: Sijie Guo <sijie@apache.org>
AuthorDate: Mon Aug 27 11:47:56 2018 -0700

    Revert "Kinesis-sink consider topic-name as partition-key if record key empty (#2372)"
    
    This reverts commit 703305b5426856bab7bab30a41e4f242e7782dc7.
---
 .../kinesis/src/main/java/org/apache/pulsar/io/kinesis/KinesisSink.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pulsar-io/kinesis/src/main/java/org/apache/pulsar/io/kinesis/KinesisSink.java
b/pulsar-io/kinesis/src/main/java/org/apache/pulsar/io/kinesis/KinesisSink.java
index cdfadde..67de21a 100644
--- a/pulsar-io/kinesis/src/main/java/org/apache/pulsar/io/kinesis/KinesisSink.java
+++ b/pulsar-io/kinesis/src/main/java/org/apache/pulsar/io/kinesis/KinesisSink.java
@@ -114,7 +114,7 @@ public class KinesisSink implements Sink<byte[]> {
                     record.getRecordSequence());
             throw new IllegalStateException("kinesis queue has publish failure");
         }
-        String partitionedKey = record.getKey().orElse(record.getTopicName().orElse(defaultPartitionedKey));
+        String partitionedKey = record.getKey().orElse(defaultPartitionedKey);
         partitionedKey = partitionedKey.length() > maxPartitionedKeyLength
                 ? partitionedKey.substring(0, maxPartitionedKeyLength - 1)
                 : partitionedKey; // partitionedKey Length must be at least one, and at most
256


Mime
View raw message