xintongsong commented on a change in pull request #11363:
URL: https://github.com/apache/flink/pull/11363#discussion_r412697593
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/StandaloneResourceManagerFactory.java
##########
@@ -28,31 +28,35 @@
import org.apache.flink.runtime.metrics.groups.ResourceManagerMetricGroup;
import org.apache.flink.runtime.rpc.FatalErrorHandler;
import org.apache.flink.runtime.rpc.RpcService;
+import org.apache.flink.util.ConfigurationException;
import javax.annotation.Nullable;
/**
* {@link ResourceManagerFactory} which creates a {@link
StandaloneResourceManager}.
*/
-public enum StandaloneResourceManagerFactory implements
ResourceManagerFactory<ResourceID> {
Review comment:
I'm aware that enums are preferred for implementing singletons. But in
this case I believe we have good reasons to change it into a class.
The reason is that, we have changed `ResourceManagerFactory` from an
interface into an abstract class. A enum cannot extends an abstract class. And
the reason for making `ResourceManagerFactory` an abstract class it that, the
`ResourceManagerFactory` implementations have not only public APIs in common,
but also part of the internal implementations (i.e., the concrete
implementations in `ResourceManagerFactory`).
IIUC, it is for the same reason that you have changed
`YarnResourceManagerFactory` from enum into class in FLINK-13579? All the other
resource manager factories are already classes except for the standalone ones.
----------------------------------------------------------------
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]