简体   繁体   English

如何使用 Apache Flink 中上传的 jar 提交作业?

[英]How to submit a job, by using an uploaded jar in Apache Flink?

I've already uploaded a jar (which was generated through a word count java program) to Apache Flink web console through an HTTP Post request via curl and the get jars api shows the uploaded jar.我已经通过 curl 的 HTTP Post 请求将一个 jar(通过字数统计 java 程序生成)上传到Apache Flink Web 控制台,get jars api 显示了上传的 jar。

When I try to submit a job using that jar, it throws me this error:当我尝试使用该 jar 提交作业时,它会引发此错误:

Caused by: org.apache.flink.client.program.ProgramInvocationException: JAR file does not exist '/tmp/flink-web-8aa36f99-87fb-4fbc-b155-237fd833fc32/:949611ce-345a-4cd5-986b-8ff9b0700852_WordCount.jar'引起:org.apache.flink.client.program.ProgramInvocationException:JAR 文件不存在'/tmp/flink-web-8aa36f99-87fb-4fbc-b155-237fd833fc32/:949611ce-345a-4cd5-9950b07 '

This is how my POST request looks like:这是我的 POST 请求的样子:

http://localhost:8081/jars/:949611ce-345a-4cd5-986b-8ff9b0700852_WordCount.jar/run

I followed their official docs for reference.我遵循了他们的官方文档以供参考。 Where am i going wrong?我哪里出错了? Any help could be appreciated.任何帮助将不胜感激。

Ensure that the jar file is located in your temp directory.确保 jar 文件位于您的临时目录中。 There is a ':' in path, is it correct?路径中有一个':',对吗?

I study REST API recently and successfully submit my job with POST request我最近在学习 REST API 并通过 POST 请求成功提交了我的工作

http://host:port/jars/29525e98-3ece-49c1-85d1-5301a5a38900_myjob.jar/run?allowNonRestoredState=false&entry-class=&parallelism=&program-args=&savepointPath=

Also you can submit job via Flink Dashboard and detect correct url through Chrome DevToos at Network tab (or something like this)您也可以通过 Flink Dashboard 提交作业,并通过 Chrome DevToos 在 Network 选项卡(或类似的东西)检测正确的 url

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM