XComp commented on code in PR #22959:
URL: https://github.com/apache/flink/pull/22959#discussion_r1255295916


##########
flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/DefaultLeaderElection.java:
##########
@@ -56,4 +56,40 @@ public boolean hasLeadership(UUID leaderSessionId) {
     public void close() throws Exception {
         parentService.remove(contenderID);
     }
+
+    /**
+     * {@link ParentService} is introduced to define the protocol between 
{@link

Review Comment:
   ```suggestion
        * {@link ParentService} is defines the protocol between {@link
   ```
   nit: I guess we should describe the current state in JavaDoc rather than how 
we got there



##########
flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/DefaultLeaderElection.java:
##########
@@ -56,4 +56,40 @@ public boolean hasLeadership(UUID leaderSessionId) {
     public void close() throws Exception {
         parentService.remove(contenderID);
     }
+
+    /**
+     * {@link ParentService} is introduced to define the protocol between 
{@link
+     * LeaderElectionService} and {@link LeaderElection}.
+     */
+    abstract static class ParentService {

Review Comment:
   ```suggestion
       static abstract class ParentService {
   ```
   the order felt strange. But it looks like we're not enforcing this special 
case with checkstyle. :thinking: Anyway, I checked other occurrences in the 
code. There's only one occurrence with 
`HiveMetaStoreClient.MetastoreMapIterable` where it is used. I propose to stick 
to the order where `static` comes first for consistency reasons



##########
flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/DefaultLeaderElection.java:
##########
@@ -56,4 +56,40 @@ public boolean hasLeadership(UUID leaderSessionId) {
     public void close() throws Exception {
         parentService.remove(contenderID);
     }
+
+    /**
+     * {@link ParentService} is introduced to define the protocol between 
{@link
+     * LeaderElectionService} and {@link LeaderElection}.
+     */
+    abstract static class ParentService {
+
+        /**
+         * Registers the {@link LeaderContender} under the {@code contenderID} 
with the underlying
+         * {@code LeaderElectionService}. Leadership changes are starting to 
be reported to the

Review Comment:
   ```suggestion
            * {@code ParentService}. Leadership changes are starting to be 
reported to the
   ```
   I guess we have to rename `LeaderElectionService` into `ParentService` in 
the JavaDoc as well. ...since we're not implementing the interface anymore.
   
   This applies to other JavaDoc comments in this class as well.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to