zentol commented on code in PR #22404:
URL: https://github.com/apache/flink/pull/22404#discussion_r1221649459


##########
flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/TestingContender.java:
##########
@@ -31,22 +31,17 @@ public class TestingContender extends TestingLeaderBase 
implements LeaderContend
     private static final Logger LOG = 
LoggerFactory.getLogger(TestingContender.class);
 
     private final String address;
-    private final LeaderElectionService leaderElectionService;
     private LeaderElection leaderElection;

Review Comment:
   final?



##########
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMasterServiceLeadershipRunner.java:
##########
@@ -82,7 +81,6 @@ public class JobMasterServiceLeadershipRunner implements 
JobManagerRunner, Leade
 
     private final JobMasterServiceProcessFactory 
jobMasterServiceProcessFactory;
 
-    private final LeaderElectionService leaderElectionService;
     private LeaderElection leaderElection;

Review Comment:
   final?



##########
flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherCleanupITCase.java:
##########
@@ -157,10 +157,9 @@ public void testCleanupThroughRetries() throws Exception {
         jobGraphStore.start(NoOpJobGraphListener.INSTANCE);
         haServices.setJobGraphStore(jobGraphStore);
 
-        // Construct leader election service.
-        final TestingLeaderElectionService leaderElectionService =
-                new TestingLeaderElectionService();
-        haServices.setJobMasterLeaderElectionService(jobId, 
leaderElectionService);
+        // Construct leader election.
+        final TestingLeaderElection leaderElection = new 
TestingLeaderElection();
+        haServices.setJobMasterLeaderElectionService(jobId, leaderElection);

Review Comment:
   should the method name be updated?



##########
flink-runtime/src/test/java/org/apache/flink/runtime/highavailability/TestingHighAvailabilityServices.java:
##########
@@ -49,20 +49,20 @@ public class TestingHighAvailabilityServices implements 
HighAvailabilityServices
     private volatile Function<JobID, LeaderRetrievalService> 
jobMasterLeaderRetrieverFunction =
             ignored -> null;
 
-    private volatile Function<JobID, LeaderElectionService> 
jobMasterLeaderElectionServiceFunction =
+    private volatile Function<JobID, LeaderElection> 
jobMasterLeaderElectionServiceFunction =
             ignored -> null;
 
     private ConcurrentHashMap<JobID, LeaderRetrievalService> 
jobMasterLeaderRetrievers =
             new ConcurrentHashMap<>();
 
-    private ConcurrentHashMap<JobID, LeaderElectionService> 
jobManagerLeaderElectionServices =
+    private ConcurrentHashMap<JobID, LeaderElection> 
jobManagerLeaderElectionServices =

Review Comment:
   rename field and setter



##########
flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/TestingLeaderElection.java:
##########
@@ -99,6 +95,10 @@ public synchronized void close() {
         startFuture = new CompletableFuture<>();
     }
 
+    private boolean hasLeadership() {

Review Comment:
   why is this being moved?



-- 
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