Skip to content

Commit a8d6b1d

Browse files
authored
Update HiveClientImpl.scala
1 parent 76192b2 commit a8d6b1d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,18 +221,14 @@ private[hive] class HiveClientImpl(
221221
hiveConf
222222
}
223223

224-
private val userName = try {
224+
private val userName = {
225225
val doAs = sys.env.get("HADOOP_USER_NAME").orNull
226226
val ugi = if (doAs != null && doAs.length() > 0) {
227227
UserGroupInformation.createProxyUser(doAs, UserGroupInformation.getLoginUser())
228228
} else {
229229
UserGroupInformation.getCurrentUser
230230
}
231231
ugi.getShortUserName
232-
} catch {
233-
case e: Exception =>
234-
logError("Can not get login user.")
235-
throw e
236232
}
237233

238234
override def getConf(key: String, defaultValue: String): String = {

0 commit comments

Comments
 (0)