Introduction to Linkis Configuration Parameters
- Linkis server parameters, mainly including the parameters of Linkis itself and the parameters of Spring
- Parameters submitted by client calls such as Linkis SDK and Restful
- Linkis console parameters
- Parameters of Linkis itself The parameters of linkis itself can be set in the configuration file, or through environment variables and system properties. It is recommended to use the configuration file to set. The Linkis configuration file format is as follows:
│ ├── application-eureka.yml
│ ├── application-linkis.yml
│ ├── linkis-cg-engineconnmanager-io.properties
│ ├── linkis-cg-engineconnmanager.properties
│ ├── linkis-cg-engineplugin.properties
│ ├── linkis-cg-entrance.properties
│ ├── linkis-cg-linkismanager.properties
│ ├── linkis.properties ── linkis global properties
│ ├── linkis-ps-bml.properties
│ ├── linkis-ps-cs.properties
│ ├── linkis-ps-datasource.properties
│ ├── linkis-ps-publicservice.properties
│ ├── log4j2.xml
- Spring parameters Linkis service is based on SpringBoot application, Spring related parameters can be set in application-linkis.yml or in linkis configuration file. The configuration in the linkis configuration file needs to be prefixed with spring. as follows:
server.port=9102
# in linkis conf need spring prefix
spring.server.port=9102
- How restful sets parameters:
{
"executionContent": {"code": "show tables", "runType": "sql"},
"variable":{ //Custom variables needed in the code
"k1":"v1"
},
"configuration":{
"special":{ //Special configuration parameters such as log path, result set path, etc.
"k2":"v2"
},
"runtime":{ //Runtime parameters, execution configuration parameters, such as database connection parameters of JDBC engine, data source parameters of presto engine
"k3":"v3"
},
"startup":{ //Startup parameters, such as memory parameters for starting EC, spark engine parameters, hive engine parameters, etc.
"k4":"v4" For example: spark.executor.memory:5G Set the Spark executor memory, the underlying Spark, hive and other engine parameters keyName are consistent with the native parameters
}
}
},
"labels": { //Label parameters, support setting engine version, user and application
"userCreator": "hadoop-IDE"
}
- How to set parameters in SDK:
JobSubmitAction jobSubmitAction = JobSubmitAction.builder()
.addExecuteCode(code)
.setStartupParams(startupMap) //Startup parameters, such as memory parameters for starting EC, spark engine parameters, hive engine parameters, etc., such as: spark.executor.memory:5G Set the Spark executor memory, the underlying Spark, hive and other engine parameters keyName is the same as the original parameter
.setRuntimeParams(runTimeMap) //Engine, execute configuration parameters, such as database connection parameters of JDBC engine, data source parameters of presto engine
.setVariableMap(varMap) //Custom variables needed in the code
.setLabels(labels) //Label parameters, support setting engine version, user and application, etc.
.setUser(user) //submit user
.addExecuteUser(user) // execute user
.build();
- How linkis-cli sets parameters
- Common label parameters:
Map<String, Object> labels = new HashMap<String, Object>();
labels.put(LabelKeyConstant.ENGINE_TYPE_KEY, "spark-2.4.3"); // Specify engine type and version
labels.put(LabelKeyConstant.USER_CREATOR_TYPE_KEY, user + "-IDE");// Specify the running user and your APPName
labels.put(LabelKeyConstant.CODE_TYPE_KEY, "sql"); // Specify the type of script to run: spark supports: sql, scala, py; Hive: hql; shell: sh; python: python; presto: psql
labels.put(LabelKeyConstant.JOB_RUNNING_TIMEOUT_KEY, "10000");//The job runs for 10s and automatically initiates Kill, the unit is s
labels.put(LabelKeyConstant.JOB_QUEUING_TIMEOUT_KEY, "10000");//The job is queued for more than 10s and automatically initiates Kill, the unit is s
labels.put(LabelKeyConstant.RETRY_TIMEOUT_KEY, "10000");//The waiting time for the job to retry due to resources and other reasons, the unit is ms. If it fails due to insufficient queue resources, it will initiate 10 retries at intervals by default
labels.put(LabelKeyConstant.TENANT_KEY,"hduser02");//Tenant label, if the tenant parameter is specified for the task, the task will be routed to a separate ECM machine
Linkis management console parameters are convenient for users to specify resource limit parameters and default task parameters. The web interface provided is as follows: Global configuration parameters: ![](/projects/Linkis-1.2.0-en/34101f2e00d2cbbcb1cb76e055a13b31.png) It mainly includes the global queue parameter \[wds.linkis.rm.yarnqueue\], the Yarn queue used by the task by default, which can be specified in the client StartUPMap. Resource limit parameters, these parameters do not support task settings, but can be adjusted by the management console.