You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by ca...@apache.org on 2022/08/19 09:35:39 UTC

[incubator-linkis] branch dev-1.3.0 updated: for issues/2854:Incorrect YarnResource capacity calculation (#2892)

This is an automated email from the ASF dual-hosted git repository.

casion pushed a commit to branch dev-1.3.0
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git


The following commit(s) were added to refs/heads/dev-1.3.0 by this push:
     new ccba28c4b for issues/2854:Incorrect YarnResource capacity calculation (#2892)
ccba28c4b is described below

commit ccba28c4b0536d2f92a61ce4ffbb61665f9cc509
Author: cydenghua <cy...@qq.com>
AuthorDate: Fri Aug 19 17:35:32 2022 +0800

    for issues/2854:Incorrect YarnResource capacity calculation (#2892)
---
 .../manager/rm/external/yarn/YarnResourceRequester.scala       | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/external/yarn/YarnResourceRequester.scala b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/external/yarn/YarnResourceRequester.scala
index e6c824845..d201ea773 100644
--- a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/external/yarn/YarnResourceRequester.scala
+++ b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/external/yarn/YarnResourceRequester.scala
@@ -99,15 +99,7 @@ class YarnResourceRequester extends ExternalResourceRequester with Logging {
           case _ =>
             0d
         }
-        val absoluteUsedCapacity = r \ "absoluteUsedCapacity" match {
-          case jDecimal: JDecimal =>
-            jDecimal.values.toDouble
-          case jDouble: JDouble =>
-            jDouble.values
-          case _ =>
-            0d
-        }
-        val effectiveResource = absoluteCapacity - absoluteUsedCapacity
+        val effectiveResource = absoluteCapacity
         new YarnResource(
           math
             .floor(effectiveResource * totalResouceInfoResponse._1 * 1024L * 1024L / 100)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org