Skip to content

Commit

Permalink
Revert "[SPARK-32772][SQL][FOLLOWUP] Remove legacy silent support mod…
Browse files Browse the repository at this point in the history
…e for spark-sql CLI"

This reverts commit f1f7ae4.
  • Loading branch information
HyukjinKwon committed Sep 10, 2020
1 parent e0538bd commit 4a09613
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import org.apache.hadoop.hive.ql.Driver
import org.apache.hadoop.hive.ql.processors._
import org.apache.hadoop.hive.ql.session.SessionState
import org.apache.hadoop.security.{Credentials, UserGroupInformation}
import org.apache.log4j.Level
import org.apache.thrift.transport.TSocket
import sun.misc.{Signal, SignalHandler}

Expand Down Expand Up @@ -319,6 +320,9 @@ private[hive] class SparkSQLCLIDriver extends CliDriver with Logging {
// because the Hive unit tests do not go through the main() code path.
if (!isRemoteMode) {
SparkSQLEnv.init()
if (sessionState.getIsSilent) {
SparkSQLEnv.sparkContext.setLogLevel(Level.WARN.toString)
}
} else {
// Hive 1.2 + not supported in CLI
throw new RuntimeException("Remote operations not supported")
Expand Down

0 comments on commit 4a09613

Please sign in to comment.