KarmaGYZ commented on a change in pull request #13311:
URL: https://github.com/apache/flink/pull/13311#discussion_r488345856



##########
File path: 
flink-yarn/src/test/java/org/apache/flink/yarn/TestingYarnNMClientAsync.java
##########
@@ -34,11 +34,25 @@
  */
 class TestingYarnNMClientAsync extends NMClientAsyncImpl {
 
-       private volatile TriConsumer<Container, ContainerLaunchContext, 
CallbackHandler> startContainerAsyncConsumer = (ignored1, ignored2, ignored3) 
-> {};
-       private volatile TriConsumer<ContainerId, NodeId, CallbackHandler> 
stopContainerAsyncConsumer = (ignored1, ignored2, ignored3) -> {};
+       private volatile TriConsumer<Container, ContainerLaunchContext, 
CallbackHandler> startContainerAsyncConsumer;
+       private volatile TriConsumer<ContainerId, NodeId, CallbackHandler> 
stopContainerAsyncConsumer;
+       private volatile Runnable clientInitRunnable;
+       private volatile Runnable clientStartRunnable;
+       private volatile Runnable clientStopRunnable;

Review comment:
       Before we introduce the `Builder` class, these functions could be set by 
multiple threads. You're right, we do not need the `volatile` now.




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

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


Reply via email to