[ https://issues.apache.org/jira/browse/FLINK-7713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16360613#comment-16360613 ]
ASF GitHub Bot commented on FLINK-7713: --------------------------------------- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/5442#discussion_r167525322 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/webmonitor/WebMonitorUtils.java --- @@ -207,6 +215,53 @@ public static WebMonitor startWebRuntimeMonitor( } } + @SuppressWarnings({"unchecked", "rawtypes"}) + public static <T extends RestfulGateway> List<Tuple2<RestHandlerSpecification, ChannelInboundHandler>> tryLoadJarUploadHandler( + GatewayRetriever<T> leaderRetriever, + CompletableFuture<String> restAddressFuture, + Time timeout, + java.nio.file.Path uploadDir, + Executor executor) { + + // 1. Check if flink-runtime-web is in the classpath + try { + final String classname = "org.apache.flink.runtime.webmonitor.WebRuntimeMonitor"; + Class.forName(classname).asSubclass(WebMonitor.class); + } catch (ClassNotFoundException e) { + // class not found means that there is no flink-runtime-web in the classpath + return Collections.emptyList(); + } --- End diff -- This could be a separate method since we use this in `tryLoadWebContent` as well. > Port JarUploadHandler to new REST endpoint > ------------------------------------------ > > Key: FLINK-7713 > URL: https://issues.apache.org/jira/browse/FLINK-7713 > Project: Flink > Issue Type: Sub-task > Components: Distributed Coordination, REST, Webfrontend > Reporter: Tzu-Li (Gordon) Tai > Assignee: Gary Yao > Priority: Major > Labels: flip-6 > Fix For: 1.5.0 > > > Port {{JarUploadHandler}} to new REST endpoint. -- This message was sent by Atlassian JIRA (v7.6.3#76005)