Apache DolphinScheduler 使用文档(8/8):附录

2022-10-20,,,

本文章经授权转载,原文链接:

https://blog.csdn.net/MiaoSO/article/details/104770720

目录

附录.队列管理

附录.令牌管理


附录.队列管理

Q :DolphinScheduler 中的队列怎么用,用户队列和租户队列是什么意思
A :DolphinScheduler 中的队列可以在用户或者租户上指定队列,用户指定的队列优先级是高于租户队列的优先级的。例如:对MR任务指定队列,是通过 mapreduce.job.queuename 来指定队列的。

# 注意:MR在用以上方法指定队列的时候,传递参数请使用如下方式:
Configuration conf = new Configuration();
GenericOptionsParser optionParser = new GenericOptionsParser(conf, args);
String[] remainingArgs = optionParser.getRemainingArgs(); # 如果是 Spark 任务 -- queue 方式指定队列

附录.令牌管理

调用示例:

/**
* test token
*/
public void doPOSTParam()throws Exception{
// create HttpClient
CloseableHttpClient httpclient = HttpClients.createDefault(); // create http post request
HttpPost httpPost = new HttpPost("http://127.0.0.1:12345/dolphinscheduler/projects/create");
httpPost.setHeader("token", "123");
// set parameters
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("projectName", "qzw"));
parameters.add(new BasicNameValuePair("desc", "qzw"));
UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(parameters);
httpPost.setEntity(formEntity);
CloseableHttpResponse response = null;
try {
// execute
response = httpclient.execute(httpPost);
// response status code 200
if (response.getStatusLine().getStatusCode() == 200) {
String content = EntityUtils.toString(response.getEntity(), "UTF-8");
System.out.println(content);
}
} finally {
if (response != null) {
response.close();
}
httpclient.close();
}
}

文章目录:
DS 1.2.0 使用文档(1/8):架构及名词解释
DS 1.2.0 使用文档(2-3/8):集群规划及环境准备
DS 1.2.0 使用文档(4/8):软件部署
DS 1.2.0 使用文档(5/8):使用与测试
DS 1.2.0 使用文档(6/8):任务节点类型与任务参数设置
DS 1.2.0 使用文档(7/8):系统参数及自定义参数
DS 1.2.0 使用文档(8/8):附录

Apache DolphinScheduler 使用文档(8/8):附录的相关教程结束。

《Apache DolphinScheduler 使用文档(8/8):附录.doc》

下载本文的Word格式文档,以方便收藏与打印。