当前位置:网站首页>技术分享 | 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源创计划”,欢迎正在阅读的你也加入,一起分享。
边栏推荐
- 2022年现在在网上开通股票账户安全吗?会不会有什么危险?
- 爬虫(2) - Requests(1) | Requests模块的深度解析
- How does MySQL copy table data from one database to another (two databases are not linked to the same database)
- YoDA统一数据应用——融合计算在蚂蚁风险场景下的探索与实践
- Mall applet source code open source version - two open
- 【邂逅Django】——(二)数据库配置
- sdp 协议中的packetization-mode方式和三种流传输模式
- 基金管理人的合规管理
- New situation of digital collection market
- 《百年巨匠》数字藏品中奖名单公布
猜你喜欢

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

【邂逅Django】——(二)数据库配置

十年磨一剑:蚂蚁集团可观测性平台 AntMonitor 揭秘

CodeBlocks 左侧项目栏消失,workspace 自动保存项目,Default workspace,打开上次的workspace,工作区(图文教程,已解决)

数据库实验报告(一)

Venv: directory structure of venv

LeetCode.515. 在每个树行中找最大值___逐一BFS+DFS+按层BFS

Today in history: the semiconductor war in the late 1990s; Von Neumann published the first draft; CBS acquires CNET

Mobile hard drive reads but does not display drive letter

机器学习之线性回归详解
随机推荐
【论文阅读】Trajectory-guided Control Prediction for End-to-end Autonomous Driving: A Simple yet Strong Ba
Submission lottery - light application server essay solicitation activity (may) award announcement
Rising Stars in Plant Sciences (RSPS2022) Finalist科学演讲会(6.30晚9点)
106. construct binary tree from middle order and post order traversal sequence
Database experiment report (II)
NC | intestinal cells and lactic acid bacteria work together to prevent Candida infection
Internal control of fund managers
Kotlin coprocessor scheduling switch threads it's time to unravel the truth
内存泄漏定位工具之 valgrind 使用
SQL Server列一相同的情况下,如何取列二的最大值,并重新生成表
Can I choose to open an account on CICC securities? Is it safe?
678. 有效的括号字符串
Crawler (2) - requests (1) | deep parsing of requests module
678. Valid bracket string
LeetCode. 515. Find the maximum value in each tree row___ BFS + DFS + BFS by layer
关于#SQL#的问题,如何解决?
JS foundation -- data type
Half of 2022 has passed, isn't it sudden?
[paper reading] trajectory guided control prediction for end to end autonomous driving: a simple yet strong Ba
Graduation season · advanced technology er