You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by "amenhub@163.com" <am...@163.com> on 2020/10/21 11:11:05 UTC

Flink-1.11.1 Rest API使用

hi everyone,

如[1]所示的Rest API该怎么进行参数设置并在postman中测试呢?疑惑的地方在于其中的Query Parameter参数例如mode该怎么传给URL?如果有例子说明,感激不尽

[1] https://ci.apache.org/projects/flink/flink-docs-release-1.11/zh/monitoring/rest_api.html#jobs-jobid-1

best,
amenhub

Re: Re: Flink-1.11.1 Rest API使用

Posted by "amenhub@163.com" <am...@163.com>.
还真是不支持,多谢解惑~



 
发件人: Peidian Li
发送时间: 2020-10-22 19:13
收件人: user-zh
主题: Re: Flink-1.11.1 Rest API使用
Yarn 的proxy server不支持POST请求,这是前几天yarn同事给我截的图:
我们改了下proxy server的逻辑来支持POST请求就可以了


一个stop with savepoint例子:
http://zjy-hadoop-prc-ct11.bj:21001/proxy/application_1600936402499_375893/jobs/790e4740baa52b43c0ceb9a5cdaf6135/stop?proxyapproved=true

Request body:
{
"drain" : true,
"targetDirectory" : "hdfs://zjyprc-hadoop/user/s_flink_tst/checkpoints4"
}

Response:
{
"request-id": "69416efc4538f56759f77a3001c38ff8"
}

2020年10月22日 下午2:30,Husky Zeng <56...@qq.com> 写道:

其他接口大多不是post类型,你要修改成get或者其他的。可以先仔细阅读一下你发的这个页面上面的介绍,看看部署有没有出错。



--
Sent from: http://apache-flink.147419.n8.nabble.com/


Re: Re: Flink-1.11.1 Rest API使用

Posted by Husky Zeng <56...@qq.com>.
其他接口大多不是post类型,你要修改成get或者其他的。可以先仔细阅读一下你发的这个页面上面的介绍,看看部署有没有出错。



--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: Re: Flink-1.11.1 Rest API使用

Posted by caozhen <ca...@163.com>.
是使用的PATCH请求嘛?


--------


amenhub@163.com wrote
> 感谢回复,
> 
> 不过好像没有用,是因为我使用per-job方式提交到yarn,然后yarn代理的URL无法响应吗?
> 
> 我测试其他很多接口还都会报405异常‘HTTP method POST is not supported by this URL’...
> 
> best,
> amenhub
> 
> 
> 
>  
> 发件人: Husky Zeng
> 发送时间: 2020-10-22 11:17
> 收件人: user-zh
> 主题: Re: Flink-1.11.1 Rest API使用
> jobId=123456  mode选择cancel
>  
> 那么你发送
> http://ip:port/../jobs/123456?mode=cancel
>  
>  
>  
>  
>  
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/





--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: Re: Flink-1.11.1 Rest API使用

Posted by "amenhub@163.com" <am...@163.com>.
感谢回复,

不过好像没有用,是因为我使用per-job方式提交到yarn,然后yarn代理的URL无法响应吗?

我测试其他很多接口还都会报405异常‘HTTP method POST is not supported by this URL’...

best,
amenhub



 
发件人: Husky Zeng
发送时间: 2020-10-22 11:17
收件人: user-zh
主题: Re: Flink-1.11.1 Rest API使用
jobId=123456  mode选择cancel
 
那么你发送
http://ip:port/../jobs/123456?mode=cancel
 
 
 
 
 
--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: Flink-1.11.1 Rest API使用

Posted by Husky Zeng <56...@qq.com>.
jobId=123456  mode选择cancel

那么你发送
http://ip:port/../jobs/123456?mode=cancel





--
Sent from: http://apache-flink.147419.n8.nabble.com/