tillrohrmann commented on a change in pull request #10462: 
[FLINK-15031][runtime] Calculate required shuffle memory before allocating 
slots if resources are specified
URL: https://github.com/apache/flink/pull/10462#discussion_r354830732
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/shuffle/NettyShuffleMaster.java
 ##########
 @@ -28,8 +30,15 @@
 /**
  * Default {@link ShuffleMaster} for netty and local file based shuffle 
implementation.
  */
-public enum NettyShuffleMaster implements 
ShuffleMaster<NettyShuffleDescriptor> {
-       INSTANCE;
+public class NettyShuffleMaster implements 
ShuffleMaster<NettyShuffleDescriptor> {
+
+       @VisibleForTesting
+       public NettyShuffleMaster() {
+               this(new Configuration());
+       }
 
 Review comment:
   Instead of adding a testing constructor, one could also introduce a testing 
utility which creates a `NettyShuffleMaster` with `new Configuration`. That way 
one would keep the production code a bit cleaner.

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


With regards,
Apache Git Services

Reply via email to