[
https://issues.apache.org/jira/browse/KAFKA-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14147365#comment-14147365
]
Neha Narkhede commented on KAFKA-1618:
--------------------------------------
Thanks for the patch, though I couldn't apply it successfully. Maybe you need
to rebase?
{noformat}
nnarkhed-mn1:kafka-git-idea nnarkhed$ patch -p0 -i
~/Projects/kafka-patches/1618.patch
patching file core/src/main/scala/kafka/tools/ProducerPerformance.scala
Hunk #1 FAILED at 125.
Hunk #2 FAILED at 136.
Hunk #3 succeeded at 161 (offset -3 lines).
Hunk #4 FAILED at 214.
Hunk #5 succeeded at 243 with fuzz 1 (offset -4 lines).
3 out of 5 hunks FAILED -- saving rejects to file
core/src/main/scala/kafka/tools/ProducerPerformance.scala.rej
patching file core/src/main/scala/kafka/tools/ConsoleProducer.scala
Hunk #1 FAILED at 229.
Hunk #2 succeeded at 275 (offset -7 lines).
Hunk #3 succeeded at 288 with fuzz 2 (offset -7 lines).
1 out of 3 hunks FAILED -- saving rejects to file
core/src/main/scala/kafka/tools/ConsoleProducer.scala.rej
patching file core/src/main/scala/kafka/tools/GetOffsetShell.scala
Hunk #1 FAILED at 64.
1 out of 1 hunk FAILED -- saving rejects to file
core/src/main/scala/kafka/tools/GetOffsetShell.scala.rej
can't find file to patch at input line 200
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
{noformat}
> Exception thrown when running console producer with no port number for the
> broker
> ---------------------------------------------------------------------------------
>
> Key: KAFKA-1618
> URL: https://issues.apache.org/jira/browse/KAFKA-1618
> Project: Kafka
> Issue Type: Improvement
> Affects Versions: 0.8.1.1
> Reporter: Gwen Shapira
> Assignee: BalajiSeshadri
> Labels: newbie
> Fix For: 0.8.2
>
> Attachments: KAFKA-1618-ALL.patch, KAFKA-1618-ALL.patch,
> KAFKA-1618-REVIEW-COMMENTS-SPACE-CORRECTION.patch,
> KAFKA-1618-REVIEW-COMMENTS.patch, KAFKA-1618.patch
>
>
> When running console producer with just "localhost" as the broker list, I get
> ArrayIndexOutOfBounds exception.
> I expect either a clearer error about arguments or for the producer to
> "guess" a default port.
> [root@shapira-1 bin]# ./kafka-console-producer.sh --topic rufus1
> --broker-list localhost
> java.lang.ArrayIndexOutOfBoundsException: 1
> at
> kafka.client.ClientUtils$$anonfun$parseBrokerList$1.apply(ClientUtils.scala:102)
> at
> kafka.client.ClientUtils$$anonfun$parseBrokerList$1.apply(ClientUtils.scala:97)
> at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
> at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
> at
> scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
> at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
> at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
> at scala.collection.AbstractTraversable.map(Traversable.scala:105)
> at kafka.client.ClientUtils$.parseBrokerList(ClientUtils.scala:97)
> at
> kafka.producer.BrokerPartitionInfo.<init>(BrokerPartitionInfo.scala:32)
> at
> kafka.producer.async.DefaultEventHandler.<init>(DefaultEventHandler.scala:41)
> at kafka.producer.Producer.<init>(Producer.scala:59)
> at kafka.producer.ConsoleProducer$.main(ConsoleProducer.scala:158)
> at kafka.producer.ConsoleProducer.main(ConsoleProducer.scala)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)