Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/kafka-console-producer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export KAFKA_HEAP_OPTS="-Xmx512M"
fi
exec $(dirname $0)/kafka-run-class.sh kafka.tools.ConsoleProducer "$@"
exec $(dirname $0)/kafka-run-class.sh org.apache.kafka.tools.ConsoleProducer "$@"
2 changes: 1 addition & 1 deletion bin/windows/kafka-console-producer.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ rem limitations under the License.

SetLocal
set KAFKA_HEAP_OPTS=-Xmx512M
"%~dp0kafka-run-class.bat" kafka.tools.ConsoleProducer %*
"%~dp0kafka-run-class.bat" org.apache.kafka.tools.ConsoleProducer %*
EndLocal
2 changes: 2 additions & 0 deletions checkstyle/import-control.xml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@
<allow pkg="scala.collection" />
<allow pkg="org.apache.kafka.coordinator.transaction" />
<allow pkg="org.apache.kafka.coordinator.group" />
<allow pkg="org.apache.kafka.tools" />
Comment thread
mimaison marked this conversation as resolved.
<allow pkg="org.apache.kafka.tools.api" />

<subpackage name="consumer">
<allow pkg="org.apache.kafka.tools"/>
Expand Down
2 changes: 1 addition & 1 deletion checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
<suppress checks="BooleanExpressionComplexity"
files="(StreamsResetter|DefaultMessageFormatter).java"/>
<suppress checks="NPathComplexity"
files="(DefaultMessageFormatter|ProducerPerformance|StreamsResetter|Agent|TransactionalMessageCopier|ReplicaVerificationTool).java"/>
files="(DefaultMessageFormatter|ProducerPerformance|StreamsResetter|Agent|TransactionalMessageCopier|ReplicaVerificationTool|LineMessageReader).java"/>
<suppress checks="ImportControl"
files="SignalLogger.java"/>
<suppress checks="IllegalImport"
Expand Down
426 changes: 0 additions & 426 deletions core/src/main/scala/kafka/tools/ConsoleProducer.scala

This file was deleted.

14 changes: 0 additions & 14 deletions core/src/main/scala/kafka/utils/ToolsUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,6 @@ import joptsimple.OptionParser
import org.apache.kafka.server.util.CommandLineUtils

object ToolsUtils {

def validatePortOrDie(parser: OptionParser, hostPort: String): Unit = {
val hostPorts: Array[String] = if (hostPort.contains(','))
hostPort.split(",")
else
Array(hostPort)
val validHostPort = hostPorts.filter { hostPortData =>
org.apache.kafka.common.utils.Utils.getPort(hostPortData) != null
}
val isValid = validHostPort.nonEmpty && validHostPort.length == hostPorts.length
if (!isValid)
CommandLineUtils.printUsageAndExit(parser, "Please provide valid host:port like host1:9091,host2:9092\n ")
}

Comment thread
wernerdv marked this conversation as resolved.
/**
* This is a simple wrapper around `CommandLineUtils.printUsageAndExit`.
* It is needed for tools migration (KAFKA-14525), as there is no Java equivalent for return type `Nothing`.
Expand Down
259 changes: 0 additions & 259 deletions core/src/test/scala/unit/kafka/tools/ConsoleProducerTest.scala

This file was deleted.

Loading