Skip to content

Commit df1a3fa

Browse files
committed
Code review comments from Michael
1 parent bbfeaed commit df1a3fa

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLDriver.scala

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,7 @@ private[hive] class SparkSQLDriver(
6666
new CommandProcessorResponse(0)
6767
} catch {
6868
case ae: AnalysisException =>
69-
// On analysis exception we will supress printing of the exception
70-
// on to console. We do that by removing the console appender. If
71-
// Logging is setup to log to both console and file , we will still
72-
// log the error to the file.
73-
val appender = LogManager.getRootLogger().getAppender("console")
74-
if (appender != null) {
75-
LogManager.getRootLogger().removeAppender("console")
76-
}
77-
78-
logError(s"Failed in [$command]", ae)
79-
80-
// Restore the console appender.
81-
if (appender != null) {
82-
LogManager.getRootLogger().addAppender(appender)
83-
}
69+
logDebug(s"Failed in [$command]", ae)
8470
new CommandProcessorResponse(1, ExceptionUtils.getStackTrace(ae), null, ae)
8571
case cause: Throwable =>
8672
logError(s"Failed in [$command]", cause)

0 commit comments

Comments
 (0)