We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76192b2 commit a8d6b1dCopy full SHA for a8d6b1d
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
@@ -221,18 +221,14 @@ private[hive] class HiveClientImpl(
221
hiveConf
222
}
223
224
- private val userName = try {
+ private val userName = {
225
val doAs = sys.env.get("HADOOP_USER_NAME").orNull
226
val ugi = if (doAs != null && doAs.length() > 0) {
227
UserGroupInformation.createProxyUser(doAs, UserGroupInformation.getLoginUser())
228
} else {
229
UserGroupInformation.getCurrentUser
230
231
ugi.getShortUserName
232
- } catch {
233
- case e: Exception =>
234
- logError("Can not get login user.")
235
- throw e
236
237
238
override def getConf(key: String, defaultValue: String): String = {
0 commit comments