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

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


The following commit(s) were added to refs/heads/dev by this push:
     new 3d63e4fc0 YarnUtils Deprecated method optimization (#2866)
3d63e4fc0 is described below

commit 3d63e4fc0960edea038b765fac8d43e7db2e5e7d
Author: ChengJie1053 <[email protected]>
AuthorDate: Thu Jul 20 13:26:35 2023 +0800

    YarnUtils Deprecated method optimization (#2866)
---
 .../src/main/scala/org/apache/streampark/common/util/YarnUtils.scala  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/streampark-common/src/main/scala/org/apache/streampark/common/util/YarnUtils.scala
 
b/streampark-common/src/main/scala/org/apache/streampark/common/util/YarnUtils.scala
index 2c58dda15..6030cebb2 100644
--- 
a/streampark-common/src/main/scala/org/apache/streampark/common/util/YarnUtils.scala
+++ 
b/streampark-common/src/main/scala/org/apache/streampark/common/util/YarnUtils.scala
@@ -24,7 +24,7 @@ import org.apache.hadoop.net.NetUtils
 import org.apache.hadoop.yarn.api.records._
 import org.apache.hadoop.yarn.api.records.YarnApplicationState._
 import org.apache.hadoop.yarn.conf.{HAUtil, YarnConfiguration}
-import org.apache.hadoop.yarn.util.{ConverterUtils, RMHAUtils}
+import org.apache.hadoop.yarn.util.RMHAUtils
 import org.apache.hc.client5.http.config.RequestConfig
 
 import java.net.InetAddress
@@ -87,7 +87,7 @@ object YarnUtils extends Logger {
    * @return
    */
   def getState(appId: String): YarnApplicationState = {
-    val applicationId = ConverterUtils.toApplicationId(appId)
+    val applicationId = ApplicationId.fromString(appId)
     val state =
       try {
         val applicationReport = 
HadoopUtils.yarnClient.getApplicationReport(applicationId)

Reply via email to