当前位置:网站首页>技术分享 | Linkis参数介绍
技术分享 | Linkis参数介绍
2022-07-01 10:54:00 【微众开源】

导语:本文主要对Linkis的参数体系进行介绍,包括Linkis服务端参数、客户端参数、管理台参数的介绍。
Linkis参数主要分为以下三个部分:
Linkis 服务端参数,主要包含Linkis本身的参数和Spring的参数
Linkis SDK、Restful等客户端端调用提交的参数
Linkis 管理台参数
├──conf 配置目录│ ├── application-eureka.yml│ ├── application-linkis.yml│ ├── linkis-cg-engineconnmanager.properties│ ├── linkis-cg-engineplugin.properties│ ├── linkis-cg-entrance.properties│ ├── linkis-cg-linkismanager.properties│ ├── linkis-mg-gateway.properties│ ├── linkis-ps-cs.properties│ ├── linkis-ps-data-source-manager.properties│ ├── linkis-ps-metadatamanager.properties│ ├── linkis-ps-publicservice.properties│ ├── linkis.properties│ ├── log4j2-console.xml│ ├── log4j2.xml
建议通用的参数放置在主配置文件,个性配置文件放在服务配置文件
Linkis服务是基于SpringBoot应用的,Spring相关的参数支持在application-linkis.yml进行设置,也支持在linkis配置文件里面进行配置。在linkis配置文件里面配置需要加上spring.的前缀。如下:
spring port defaultserver.port=9102in linkis conf need spring prefixspring.server.port=9102
{"executionContent": {"code": "show tables", "runType": "sql"},"params": { // 提交参数"variable":{ //代码中需要的自定义变量"k1":"v1"},"configuration":{"special":{ //特殊配置参数 如日志路径,结果集路径等"k2":"v2"},"runtime":{ //运行时参数,如JDBC引擎的的数据库连接参数,presto引擎的数据源参数"k3":"v3"},"startup":{ //启动参数,如启动EC的内存参数,spark引擎参数、hive引擎参数等"k4":"v4" 如:spark.executor.memory:5G 设置Spark的执行器内存,底层Spark、hive等引擎参数keyName是和原生参数一致的}}},"labels": { //标签参数,支持设置引擎版本、用户和提应用"engineType": "spark-2.4.3","userCreator": "hadoop-IDE"}}
注:注释在方法上面JobSubmitAction jobSubmitAction =JobSubmitAction.builder().addExecuteCode(code)//启动参数,如启动EC的内存参数,spark引擎参数、hive引擎参数等, 如:spark.executor.memory:5G 设置Spark的执行器内存,底层Spark、hive等引擎参数keyName是和原生参数一致的.setStartupParams(startupMap)//运行时参数,如JDBC引擎的的数据库连接参数,presto引擎的数据源参数.setRuntimeParams(runTimeMap)//代码中需要的自定义变量.setVariableMap(varMap)//标签参数,支持设置引擎版本、用户和提应用等.setLabels(labels)//submit user.setUser(user)// execute user.addExecuteUser(user).build();
linkis-cli -runtieMap key1=value -runtieMap key2=value-labelMap key1=value-varMap key1=value-startUpMap key1=value
Map<String, Object> labels = new HashMap<String, Object>();labels.put(LabelKeyConstant.ENGINE_TYPE_KEY, "spark-2.4.3"); // 指定引擎类型和版本labels.put(LabelKeyConstant.USER_CREATOR_TYPE_KEY, user + "-IDE");// 指定运行的用户和您的APPNamelabels.put(LabelKeyConstant.CODE_TYPE_KEY, "sql"); // 指定运行的脚本类型:spark支持:sql、scala、py;Hive:hql;shell:sh;python:python;presto:psqllabels.put(LabelKeyConstant.JOB_RUNNING_TIMEOUT_KEY, "10");//job运行10s没完成自动发起Kill,单位为slabels.put(LabelKeyConstant.JOB_QUEUING_TIMEOUT_KEY, "10");//job排队超过10s没完成自动发起Kill,单位为slabels.put(LabelKeyConstant.RETRY_TIMEOUT_KEY, "10000");//job因为资源等原因失败重试的等待时间,单位为ms,如果因为队列资源不足的失败,会默认按间隔发起10次重试labels.put(LabelKeyConstant.TENANT_KEY,"hduser02");//租户标签,任务如果指定了租户参数则任务会被路由到单独的ECM机器labels.put(LabelKeyConstant.EXECUTE_ONCE_KEY,"");//执行一次标签,该参数不建议设置,设置后引擎不会复用任务运行完就会结束引擎,只有某个任务参数有特殊化的可以进行设置

队列CPU使用上限[wds.linkis.rm.yarnqueue.cores.max],现阶段只支持限制Spark类型任务总队列资源的使用队列内存使用上限[wds.linkis.rm.yarnqueue.memory.max]全局各个引擎内存使用上限[wds.linkis.rm.client.memory.max] 该参数不是指总共只能使用的内存,而是指定某个Creator特定引擎总的内存使用,如限制IDE-SPARK任务只能使用10G内存全局各个引擎核心个数上限[wds.linkis.rm.client.core.max]该参数不是指总共只能使用的CPU,而是指定某个Creator特定引擎总的内存使用,如限制IDE-SPARK任务只能使用10Cores全局各个引擎最大并发数[wds.linkis.rm.instance],该参数有两层含义,一个是限制某个Creator特定引擎总共能启动多少个,以及限制某个Creator特定引擎任务同时能运行的任务数


如何成为社区贡献者
1 ► 官方文档贡献。发现文档的不足、优化文档,持续更新文档等方式参与社区贡献。通过文档贡献,让开发者熟悉如何提交PR和真正参与到社区的建设。参考攻略:保姆级教程:如何成为Apache Linkis文档贡献者
2 ► 代码贡献。我们梳理了社区中简单并且容易入门的的任务,非常适合新人做代码贡献。请查阅新手任务列表:https://github.com/apache/incubator-linkis/issues/1161
3 ► 内容贡献:发布WeDataSphere开源组件相关的内容,包括但不限于安装部署教程、使用经验、案例实践等,形式不限,请投稿给小助手。例如:
4 ► 社区答疑:积极在社区中进行答疑、分享技术、帮助开发者解决问题等;
5 ► 其他:积极参与社区活动、成为社区志愿者、帮助社区宣传、为社区发展提供有效建议等;

本文分享自微信公众号 - WeDataSphere(gh_273e85fce73b)。
如有侵权,请联系 [email protected] 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一起分享。
边栏推荐
- 12款大家都在用的產品管理平臺
- CRC verification
- 商城小程序源码开源版-可二开
- [.net6] use ml.net+onnx pre training model to liven the classic "Huaqiang buys melons" in station B
- [MPC] ① quadratic programming problem matlab solver quadprog
- 基金管理人的合规管理
- Yoda unified data application -- Exploration and practice of fusion computing in ant risk scenarios
- IDEA运行报错Command line is too long. Shorten command line for...
- LeetCode. One question of the day: offer II 091 Paint the house (DP problem)
- [matytype] insert MathType inter line and intra line formulas in CSDN blog
猜你喜欢

What legal risks and qualifications should be paid attention to when building a digital collection platform?

12 plateformes de gestion de produits utilisées par tout le monde

12. Gateway new generation gateway

106. construct binary tree from middle order and post order traversal sequence

CRC 校驗

Submission lottery - light application server essay solicitation activity (may) award announcement
![[paper reading] trajectory guided control prediction for end to end autonomous driving: a simple yet strong Ba](/img/fa/f2d24ee3dbbbe6332c84a82109338e.png)
[paper reading] trajectory guided control prediction for end to end autonomous driving: a simple yet strong Ba

缺少比较器,运放来救场!(运放当做比较器电路记录)

JS基础--数据类型

IDEA运行报错Command line is too long. Shorten command line for...
随机推荐
sdp 协议中的packetization-mode方式和三种流传输模式
Venv: directory structure of venv
Combination of Oracle and JSON
2022年现在在网上开通股票账户安全吗?会不会有什么危险?
毕业季·进击的技术er
Is it safe to open a stock account online in 2022? Is there any danger?
Can I choose to open an account on CICC securities? Is it safe?
Personal mall two open Xiaoyao B2C mall system source code - Commercial Version / group shopping discount seckill source code
Rising Stars in Plant Sciences (RSPS2022) Finalist科学演讲会(6.30晚9点)
dotnet 控制台 使用 Microsoft.Maui.Graphics 配合 Skia 进行绘图入门
mysql如何把 一个数据库中的表数据 复制到 另一个数据库中(两个数据库不在同一个数据库链接下)
Valgrind usage of memory leak locating tool
LeetCode 438. 找到字符串中所有字母异位词__滑动窗口
In the new database era, don't just learn Oracle and MySQL
flutter Uint8List格式的图片和File格式图片的互相转换
Error: missing revert data in call exception
bash: ln: command not found
Oracle和JSON的結合
CRC check
CRC verification