Skip to content

Commit

Permalink
add error code 01006
Browse files Browse the repository at this point in the history
  • Loading branch information
v-kkhuang committed Nov 23, 2023
1 parent 1e0de9e commit 4f12085
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,20 @@ class DefaultEngineCreateService
// 2. Get all available ECMs by labels
val emScoreNodeList =
getEMService().getEMNodes(emLabelList.asScala.filter(!_.isInstanceOf[EngineTypeLabel]).asJava)
if (null == emScoreNodeList || emScoreNodeList.isEmpty) {
throw new LinkisRetryException(
AMConstant.EM_ERROR_CODE,
s" The em of labels ${engineCreateRequest.getLabels} not found"
)
}

// 3. Get the ECM with the lowest load by selection algorithm
val choseNode =
if (null == emScoreNodeList || emScoreNodeList.isEmpty) null
else {
logger.info(s"Suitable ems size is ${emScoreNodeList.length}")
nodeSelector.choseNode(emScoreNodeList.toArray)
}
logger.info(s"Suitable ems size is ${emScoreNodeList.length}")
val choseNode = nodeSelector.choseNode(emScoreNodeList.toArray)
if (null == choseNode || choseNode.isEmpty) {
throw new LinkisRetryException(
AMConstant.EM_ERROR_CODE,
s" The em of labels ${engineCreateRequest.getLabels} not found"
s" There are corresponding ECM tenant labels ${engineCreateRequest.getLabels}, but none of them are healthy"
)
}
val emNode = choseNode.get.asInstanceOf[EMNode]
Expand Down
1 change: 1 addition & 0 deletions linkis-dist/package/db/linkis_dml.sql
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ INSERT INTO linkis_ps_error_code (error_code,error_desc,error_regex,error_type)
INSERT INTO linkis_ps_error_code (error_code,error_desc,error_regex,error_type) VALUES ('01003','Linkis服务负载过高,请联系管理员扩容','failed to ask linkis Manager Can be retried SocketTimeoutException',0);
INSERT INTO linkis_ps_error_code (error_code,error_desc,error_regex,error_type) VALUES ('01004','引擎在启动时被Kill,请联系管理员',' [0-9]+ Killed',0);
INSERT INTO linkis_ps_error_code (error_code,error_desc,error_regex,error_type) VALUES ('01005','请求Yarn获取队列信息重试2次仍失败,请联系管理员','Failed to request external resourceClassCastException',0);
INSERT INTO linkis_ps_error_code (error_code,error_desc,error_regex,error_type) VALUES ('01006','没有健康可用的ecm节点,可能任务量大,导致节点资源处于不健康状态,尝试kill空闲引擎释放资源','There are corresponding ECM tenant labels',0);


-- 11 linkis resource 12 user resource 13 user task resouce
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ ALTER TABLE linkis_ps_common_lock ADD COLUMN locker VARCHAR(255) NOT NULL COMMEN
ALTER TABLE linkis_ps_configuration_config_key ADD column template_required tinyint(1) DEFAULT 0 COMMENT 'template required 0 none / 1 must'

ALTER TABLE linkis_ps_configuration_config_value modify COLUMN config_value varchar(500);

INSERT INTO linkis_ps_error_code (error_code,error_desc,error_regex,error_type) VALUES ('01006','没有健康可用的ecm节点,可能任务量大,导致节点资源处于不健康状态,尝试kill空闲引擎释放资源','There are corresponding ECM tenant labels',0);

0 comments on commit 4f12085

Please sign in to comment.