You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "nihyxx (via GitHub)" <gi...@apache.org> on 2025/02/18 23:40:05 UTC

[PR] MINOR: Fix Some Exceptions in MetaPropertiesEnsemble and MetadataQuorumCommand [kafka]

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

   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   
   ### 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: Fix Some Exceptions in MetaPropertiesEnsemble and MetadataQuorumCommand [kafka]

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

   This PR has been closed since it has not had any activity in 120 days. If you feel like this
   was a mistake, or you would like to continue working on it, please feel free to re-open the 
   PR and ask for a review.


-- 
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: Fix Some Exceptions in MetaPropertiesEnsemble and MetadataQuorumCommand [kafka]

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

   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 leave a comment asking for a review. If the PR has 
   merge conflicts, update it with the latest from the base branch.
   <p>
   If you are having difficulty finding a reviewer, please reach out on the 
   [mailing list](https://kafka.apache.org/contact).
   <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: Fix Some Exceptions in MetaPropertiesEnsemble and MetadataQuorumCommand [kafka]

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


##########
tools/src/main/java/org/apache/kafka/tools/MetadataQuorumCommand.java:
##########
@@ -404,16 +404,16 @@ static Set<RaftVoterEndpoint> getControllerAdvertisedListeners(
         }
         LinkedHashSet<RaftVoterEndpoint> results = new LinkedHashSet<>();
         for (String listenerName : props.getProperty(
-                KRaftConfigs.CONTROLLER_LISTENER_NAMES_CONFIG).split(",")) {
+            KRaftConfigs.CONTROLLER_LISTENER_NAMES_CONFIG).split(",")) {

Review Comment:
   How about this indentation and formatting so that the for loop statement block is clearly separated from the for loop iterable.
   
   ```java
           for (String listenerName : props.getProperty(
               KRaftConfigs.CONTROLLER_LISTENER_NAMES_CONFIG).split(",")
           ) {
   ```



##########
tools/src/main/java/org/apache/kafka/tools/MetadataQuorumCommand.java:
##########
@@ -404,16 +404,16 @@ static Set<RaftVoterEndpoint> getControllerAdvertisedListeners(
         }
         LinkedHashSet<RaftVoterEndpoint> results = new LinkedHashSet<>();
         for (String listenerName : props.getProperty(
-                KRaftConfigs.CONTROLLER_LISTENER_NAMES_CONFIG).split(",")) {
+            KRaftConfigs.CONTROLLER_LISTENER_NAMES_CONFIG).split(",")) {
             listenerName = ListenerName.normalised(listenerName).value();
             Endpoint endpoint = listeners.get(listenerName);
             if (endpoint == null) {
                 throw new TerseException("Cannot find information about controller listener name: " +
                     listenerName);
             }
             results.add(new RaftVoterEndpoint(endpoint.listenerName().get(),
-                    endpoint.host() == null ? "localhost" : endpoint.host(),
-                    endpoint.port()));
+                endpoint.host() == null ? "localhost" : endpoint.host(),
+                endpoint.port()));

Review Comment:
   How about this formatting?
   
   ```java
               results.add(
                   new RaftVoterEndpoint(
                       endpoint.listenerName().get(),
                       endpoint.host() == null ? "localhost" : endpoint.host(),
                       endpoint.port()
                   )
               );
   ```



##########
tools/src/main/java/org/apache/kafka/tools/MetadataQuorumCommand.java:
##########
@@ -266,13 +266,13 @@ else if (leader.lastCaughtUpTimestamp().isPresent() && maxLagFollower.lastCaught
 
         System.out.println(
             "ClusterId:              " + clusterId +
-            "\nLeaderId:               " + quorumInfo.leaderId() +
-            "\nLeaderEpoch:            " + quorumInfo.leaderEpoch() +
-            "\nHighWatermark:          " + quorumInfo.highWatermark() +
-            "\nMaxFollowerLag:         " + maxFollowerLag +
-            "\nMaxFollowerLagTimeMs:   " + maxFollowerLagTimeMs +
-            "\nCurrentVoters:          " + printVoterState(quorumInfo) +
-            "\nCurrentObservers:       " + printObserverState(quorumInfo)
+                "\nLeaderId:               " + quorumInfo.leaderId() +
+                "\nLeaderEpoch:            " + quorumInfo.leaderEpoch() +
+                "\nHighWatermark:          " + quorumInfo.highWatermark() +
+                "\nMaxFollowerLag:         " + maxFollowerLag +
+                "\nMaxFollowerLagTimeMs:   " + maxFollowerLagTimeMs +
+                "\nCurrentVoters:          " + printVoterState(quorumInfo) +
+                "\nCurrentObservers:       " + printObserverState(quorumInfo)

Review Comment:
   This indentation doesn't look correct. We indent Java code using 4 spaces.



-- 
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: Fix Some Exceptions in MetaPropertiesEnsemble and MetadataQuorumCommand [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #18957:
URL: https://github.com/apache/kafka/pull/18957#issuecomment-2907640003

   @nihyxx could you please fix the conflicts?


-- 
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: Fix Some Exceptions in MetaPropertiesEnsemble and MetadataQuorumCommand [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #18957: MINOR: Fix Some Exceptions in MetaPropertiesEnsemble and MetadataQuorumCommand
URL: https://github.com/apache/kafka/pull/18957


-- 
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: Fix Some Exceptions in MetaPropertiesEnsemble and MetadataQuorumCommand [kafka]

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

   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 leave a comment asking for a review. If the PR has 
   merge conflicts, update it with the latest from the base branch.
   <p>
   If you are having difficulty finding a reviewer, please reach out on the 
   [mailing list](https://kafka.apache.org/contact).
   <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