use of org.apache.flink.runtime.webmonitor.handlers.JarUploadHandler in project flink by apache.
the class WebSubmissionExtensionTest method uploadJar.
private static String uploadJar(WebSubmissionExtension extension, Path jarFile, DispatcherGateway dispatcherGateway) throws Exception {
final JarUploadHandler jarUploadHandler = extension.getJarUploadHandler();
final HandlerRequest<EmptyRequestBody> uploadRequest = HandlerRequest.create(EmptyRequestBody.getInstance(), EmptyMessageParameters.getInstance(), Collections.singletonList(jarFile.toFile()));
return jarUploadHandler.handleRequest(uploadRequest, dispatcherGateway).get().getFilename();
}
Aggregations