From 6de4fd67a06319529793e2e96101d01a7d328945 Mon Sep 17 00:00:00 2001 From: asnir Date: Wed, 16 Mar 2016 21:23:05 +0200 Subject: [PATCH] Update SimpleConsumerExample.java Bug fix: args number should be 5. --- .../confluent/examples/consumer/SimpleConsumerExample.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kafka-clients/consumer/src/main/java/io/confluent/examples/consumer/SimpleConsumerExample.java b/kafka-clients/consumer/src/main/java/io/confluent/examples/consumer/SimpleConsumerExample.java index 2b778f5c..1f04c649 100644 --- a/kafka-clients/consumer/src/main/java/io/confluent/examples/consumer/SimpleConsumerExample.java +++ b/kafka-clients/consumer/src/main/java/io/confluent/examples/consumer/SimpleConsumerExample.java @@ -200,12 +200,12 @@ public void run(long maxReads, String topic, int partition, List seedBro } public static void main(String args[]) { - if (args.length != 4) { - System.out.println("Please provide command line arguments: maxReads partitionId broker port"); + if (args.length != 5) { + System.out.println("Please provide command line arguments: maxReads topic partitionId broker port"); System.exit(-1); } - long maxReads = Long.parseLong(args[0]); + long maxReads = Long.parseLong(args[0]); String topic = args[1]; int partition = Integer.parseInt(args[2]); List seeds = new ArrayList<>();