wpfysztqx commented on a change in pull request #1051:
URL: https://github.com/apache/incubator-linkis/pull/1051#discussion_r748708526



##########
File path: 
linkis-computation-governance/linkis-manager/linkis-resource-manager/src/main/scala/org/apache/linkis/resourcemanager/external/yarn/YarnResourceRequester.scala
##########
@@ -212,8 +213,20 @@ class YarnResourceRequester extends 
ExternalResourceRequester with Logging {
     httpGet.addHeader("Accept", "application/json")
     if (this.provider.getConfigMap.get("authorEnable").asInstanceOf[Boolean])
       httpGet.addHeader(HttpHeaders.AUTHORIZATION, "Basic " + 
getAuthorizationStr)
-    val response = YarnResourceRequester.httpClient.execute(httpGet)
-    parse(EntityUtils.toString(response.getEntity()))
+    var httpResponse: HttpResponse = null
+    if(this.provider.getConfigMap.get("kerberosEnable") != null
+      && 
this.provider.getConfigMap.get("kerberosEnable").asInstanceOf[Boolean]){
+      val principalName = 
this.provider.getConfigMap.get("principalName").asInstanceOf[String]

Review comment:
        If the parameter is empty, use the else method directly 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@linkis.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@linkis.apache.org
For additional commands, e-mail: dev-h...@linkis.apache.org

Reply via email to