You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "sjhajharia (via GitHub)" <gi...@apache.org> on 2024/06/04 17:04:02 UTC

[PR] MINOR: Cleanups in Tools [kafka]

sjhajharia opened a new pull request, #16196:
URL: https://github.com/apache/kafka/pull/16196

   Various cleanups in Tools module
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Cleanups in Tools [kafka]

Posted by "sjhajharia (via GitHub)" <gi...@apache.org>.
sjhajharia closed pull request #16196: MINOR: Cleanups in Tools
URL: https://github.com/apache/kafka/pull/16196


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Cleanups in Tools [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16196:
URL: https://github.com/apache/kafka/pull/16196#issuecomment-2327846225

   This PR is being marked as stale since it has not had any activity in 90 days. If you would like to keep this PR alive, please ask a committer for review. If the PR has  merge conflicts, please update it with the latest from trunk (or appropriate release branch) <p> If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Cleanups in Tools [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #16196:
URL: https://github.com/apache/kafka/pull/16196#discussion_r1628385453


##########
tools/src/main/java/org/apache/kafka/tools/VerifiableProducer.java:
##########
@@ -63,7 +63,7 @@ public class VerifiableProducer implements AutoCloseable {
     private final String topic;
     private final Producer<String, String> producer;
     // If maxMessages < 0, produce until the process is killed externally
-    private long maxMessages = -1;
+    private long maxMessages;

Review Comment:
   could you please add `final`?



##########
tools/src/main/java/org/apache/kafka/tools/VerifiableLog4jAppender.java:
##########
@@ -47,7 +47,7 @@ public class VerifiableLog4jAppender {
     Logger logger = Logger.getLogger(VerifiableLog4jAppender.class);
 
     // If maxMessages < 0, log until the process is killed externally
-    private long maxMessages = -1;
+    private long maxMessages;

Review Comment:
   could you please add `final`?



##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/ListConsumerGroupTest.java:
##########
@@ -78,14 +77,6 @@ public class ListConsumerGroupTest {
         this.clusterInstance = clusterInstance;
     }
 
-    private static List<ClusterConfig> defaultGenerator() {
-        return ConsumerGroupCommandTestUtils.generator();
-    }
-
-    private static List<ClusterConfig> consumerProtocolOnlyGenerator() {

Review Comment:
   ditto



##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/ListConsumerGroupTest.java:
##########
@@ -78,14 +77,6 @@ public class ListConsumerGroupTest {
         this.clusterInstance = clusterInstance;
     }
 
-    private static List<ClusterConfig> defaultGenerator() {

Review Comment:
   ditto



##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/DeleteOffsetsConsumerGroupCommandIntegrationTest.java:
##########
@@ -65,10 +63,6 @@ public class DeleteOffsetsConsumerGroupCommandIntegrationTest {
         this.clusterInstance = clusterInstance;
     }
 
-    private static List<ClusterConfig> generator() {

Review Comment:
   ditto



##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/DeleteConsumerGroupsTest.java:
##########
@@ -68,10 +66,6 @@
 @ExtendWith(value = ClusterTestExtensions.class)
 public class DeleteConsumerGroupsTest {
 
-    private static List<ClusterConfig> generator() {

Review Comment:
   this method is executed dynamically. Maybe you can add comments to explain the use case?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org