Skip to content
Closed
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ project(':streams') {
compile project(':connect:json') // this dependency should be removed after we unify data API
compile libs.slf4jApi
compile libs.rocksDBJni
compile libs.joptSimple

testCompile project(':clients').sourceSets.test.output
testCompile project(':core')
Expand Down
1 change: 1 addition & 0 deletions checkstyle/import-control-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<allow pkg="kafka.producer" />
<allow pkg="kafka.consumer" />
<allow pkg="joptsimple" />
<allow pkg="org.apache.kafka.clients.admin" />
<allow pkg="org.apache.kafka.clients.consumer" />
</subpackage>

Expand Down
8 changes: 4 additions & 4 deletions core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,8 @@ object ConsumerGroupCommand extends Logging {
case "Empty" | "Dead" =>
val partitionsToReset = getPartitionsToReset(groupId)
val preparedOffsets = prepareOffsetsToReset(groupId, partitionsToReset)
val execute = opts.options.has(opts.executeOpt)
if (execute)
val dryRun = opts.options.has(opts.dryRunOpt)
if (!dryRun)
getConsumer().commitSync(preparedOffsets.asJava)
preparedOffsets
case currentState =>
Expand Down Expand Up @@ -726,7 +726,7 @@ object ConsumerGroupCommand extends Logging {
"Has 3 execution options: (default) to plan which offsets to reset, --execute to execute the reset-offsets process, and --export to export the results to a CSV format." + nl +
"Has the following scenarios to choose: --to-datetime, --by-period, --to-earliest, --to-latest, --shift-by, --from-file, --to-current. One scenario must be choose" + nl +
"To define the scope use: --all-topics or --topic. . One scope must be choose, unless you use '--from-file' scenario"
val ExecuteDoc = "Execute operation. Supported operations: reset-offsets."
val DryRunDoc = "Only show results without executing changes on Consumer Groups. Supported operations: reset-offsets."
val ExportDoc = "Export operation execution to a CSV file. Supported operations: reset-offsets."
val ResetToOffsetDoc = "Reset offsets to a specific offset."
val ResetFromFileDoc = "Reset offsets to values defined in CSV file."
Expand Down Expand Up @@ -769,7 +769,7 @@ object ConsumerGroupCommand extends Logging {
.describedAs("command config property file")
.ofType(classOf[String])
val resetOffsetsOpt = parser.accepts("reset-offsets", ResetOffsetsDoc)
val executeOpt = parser.accepts("execute", ExecuteDoc)
val dryRunOpt = parser.accepts("dry-run", DryRunDoc)
val exportOpt = parser.accepts("export", ExportDoc)
val resetToOffsetOpt = parser.accepts("to-offset", ResetToOffsetDoc)
.withRequiredArg()
Expand Down
Loading