flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-10411) Make ClusterEntrypoint more modular
Date Thu, 27 Sep 2018 11:37:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-10411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16630253#comment-16630253
] 

ASF GitHub Bot commented on FLINK-10411:
----------------------------------------

tillrohrmann commented on a change in pull request #6743: [FLINK-10411] Make ClusterEntrypoint
more compositional
URL: https://github.com/apache/flink/pull/6743#discussion_r220889028
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/ClusterEntrypoint.java
 ##########
 @@ -518,6 +498,34 @@ protected static Configuration loadConfiguration(EntrypointClusterConfiguration
 		return configuration;
 	}
 
+	// --------------------------------------------------
+	// Helper methods
+	// --------------------------------------------------
+
+	public static void runClusterEntrypoint(ClusterEntrypoint clusterEntrypoint) {
+
+		final String clusterEntrypointName = clusterEntrypoint.getClass().getSimpleName();
+		try {
+			clusterEntrypoint.startCluster();
+		} catch (ClusterEntrypointException e) {
+			LOG.error(String.format("Could not start cluster entrypoint %s.", clusterEntrypointName,
e));
 
 Review comment:
   Good catch!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Make ClusterEntrypoint more modular
> -----------------------------------
>
>                 Key: FLINK-10411
>                 URL: https://issues.apache.org/jira/browse/FLINK-10411
>             Project: Flink
>          Issue Type: Improvement
>          Components: Distributed Coordination
>    Affects Versions: 1.7.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>
> Currently, the {{ClusterEntrypoint}} is not very modular in the sense that it cannot
be really used for testing purposes (e.g. starting a {{Dispatcher}} with a {{WebMonitorRestEndpoint}}).
The problem is that the {{ClusterEntrypoint}} combines too many responsibilities (creating
the cluster services, starting the cluster components and deciding on when to terminate the
JVM process).
> I suggest to make the structure more compositional, meaning to split up the service generation
from the cluster component start up. That way we could also remove code duplication between
the different {{ClusterEntrypoint}} implementations.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message