Skip to content

Commit

Permalink
[Improve] Update the 'streampark.yarn.http-auth' configuration from '…
Browse files Browse the repository at this point in the history
…sample' to 'simple' (#3289)
  • Loading branch information
ylw-github authored Oct 26, 2023
1 parent 6ea6439 commit 85b7958
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ streampark:
# lark alert proxy,default https://open.feishu.cn
lark-url:
yarn:
# default sample, or kerberos
http-auth: sample
# default simple, or kerberos
http-auth: simple

# HADOOP_USER_NAME
hadoop-user-name: hdfs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object CommonConfig {
key = "streampark.yarn.http-auth",
defaultValue = "",
classType = classOf[String],
description = "yarn http auth type. ex: sample, kerberos")
description = "yarn http auth type. ex: simple, kerberos")

val DOCKER_HOST: InternalOption = InternalOption(
key = "streampark.docker.http-client.docker-host",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object YarnUtils extends Logger {
lazy val PROXY_YARN_URL = InternalConfigHolder.get[String](CommonConfig.STREAMPARK_PROXY_YARN_URL)

/**
* hadoop.http.authentication.type<br> get yarn http authentication mode.<br> ex: sample, kerberos
* hadoop.http.authentication.type<br> get yarn http authentication mode.<br> ex: simple, kerberos
*
* @return
*/
Expand All @@ -56,9 +56,9 @@ object YarnUtils extends Logger {
"kerberos".equalsIgnoreCase(yarnHttpAuth)
}

lazy val hasYarnHttpSampleAuth: Boolean = {
lazy val hasYarnHttpSimpleAuth: Boolean = {
val yarnHttpAuth: String = InternalConfigHolder.get[String](CommonConfig.STREAMPARK_YARN_AUTH)
"sample".equalsIgnoreCase(yarnHttpAuth)
"simple".equalsIgnoreCase(yarnHttpAuth)
}

/**
Expand Down Expand Up @@ -289,7 +289,7 @@ object YarnUtils extends Logger {
})
} else {
val url =
if (!hasYarnHttpSampleAuth) reqUrl
if (!hasYarnHttpSimpleAuth) reqUrl
else {
s"$reqUrl?user.name=${HadoopUtils.hadoopUserName}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ streampark:
# lark alert proxy,default https://open.feishu.cn
lark-url:
yarn:
# default sample, or kerberos
http-auth: sample
# default simple, or kerberos
http-auth: simple

# HADOOP_USER_NAME
hadoop-user-name: hdfs
Expand Down

0 comments on commit 85b7958

Please sign in to comment.