From 9912f18de54c6d8d7d7aaadd704199061e259330 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Sat, 26 Mar 2016 10:47:13 -0400 Subject: [PATCH] NIFI-1684 This closes #302. fixed random partitioner initialization Signed-off-by: joewitt --- .../main/java/org/apache/nifi/processors/kafka/PutKafka.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/PutKafka.java b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/PutKafka.java index 44f04aab6a..6d17493673 100644 --- a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/PutKafka.java +++ b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/PutKafka.java @@ -55,8 +55,6 @@ import org.apache.nifi.processor.exception.ProcessException; import org.apache.nifi.processor.io.InputStreamCallback; import org.apache.nifi.processor.util.StandardValidators; -import kafka.producer.DefaultPartitioner; - @InputRequirement(Requirement.INPUT_REQUIRED) @Tags({ "Apache", "Kafka", "Put", "Send", "Message", "PubSub" }) @CapabilityDescription("Sends the contents of a FlowFile as a message to Apache Kafka. The messages to send may be individual FlowFiles or may be delimited, using a " @@ -454,7 +452,7 @@ public class PutKafka extends AbstractProcessor { if (partitionStrategy.equalsIgnoreCase(ROUND_ROBIN_PARTITIONING.getValue())) { partitionerClass = Partitioners.RoundRobinPartitioner.class.getName(); } else if (partitionStrategy.equalsIgnoreCase(RANDOM_PARTITIONING.getValue())) { - partitionerClass = DefaultPartitioner.class.getName(); + partitionerClass = Partitioners.RandomPartitioner.class.getName(); } properties.setProperty("partitioner.class", partitionerClass);