You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2021/12/08 09:20:02 UTC
[incubator-linkis] branch dev-1.0.3 updated: fix NPE for /linkisManager/rm/engines api
This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch dev-1.0.3
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git
The following commit(s) were added to refs/heads/dev-1.0.3 by this push:
new 0f03f2c fix NPE for /linkisManager/rm/engines api
new f03179a Merge pull request #1168 from legendtkl/rm/engines/npe
0f03f2c is described below
commit 0f03f2c46d0fbce1c3d3a71ce4b5c2f4bd4c9cf8
Author: taokelu <ta...@bytedance.com>
AuthorDate: Tue Dec 7 21:45:21 2021 +0800
fix NPE for /linkisManager/rm/engines api
---
.../org/apache/linkis/resourcemanager/restful/RMMonitorRest.scala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/linkis-computation-governance/linkis-manager/linkis-resource-manager/src/main/scala/org/apache/linkis/resourcemanager/restful/RMMonitorRest.scala b/linkis-computation-governance/linkis-manager/linkis-resource-manager/src/main/scala/org/apache/linkis/resourcemanager/restful/RMMonitorRest.scala
index 2f12b45..3df7cd2 100644
--- a/linkis-computation-governance/linkis-manager/linkis-resource-manager/src/main/scala/org/apache/linkis/resourcemanager/restful/RMMonitorRest.scala
+++ b/linkis-computation-governance/linkis-manager/linkis-resource-manager/src/main/scala/org/apache/linkis/resourcemanager/restful/RMMonitorRest.scala
@@ -224,8 +224,10 @@ class RMMonitorRest extends Logging {
val record = new mutable.HashMap[String, Any]
record.put("applicationName", node.getServiceInstance.getApplicationName)
record.put("engineInstance", node.getServiceInstance.getInstance)
- record.put("moduleName", node.getEMNode.getServiceInstance.getApplicationName)
- record.put("engineManagerInstance", node.getEMNode.getServiceInstance.getInstance)
+ if (node.getEMNode != null) {
+ record.put("moduleName", node.getEMNode.getServiceInstance.getApplicationName)
+ record.put("engineManagerInstance", node.getEMNode.getServiceInstance.getInstance)
+ }
record.put("creator", userCreatorLabel.getCreator)
record.put("engineType", engineTypeLabel.getEngineType)
if(node.getNodeResource != null){
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org