aboutsummaryrefslogtreecommitdiff
path: root/sql/hive-thriftserver/src
diff options
context:
space:
mode:
authorMichael Armbrust <michael@databricks.com>2014-08-17 18:10:45 -0700
committerMichael Armbrust <michael@databricks.com>2014-08-17 18:10:45 -0700
commit5ecb08ea063166564178885b7515abef0d76eecb (patch)
treec1566cf415c1b8b6652c87b74d5f9e95477ca112 /sql/hive-thriftserver/src
parent318e28b503f22a89c23b7b3624e5fcf689fb92a2 (diff)
downloadspark-5ecb08ea063166564178885b7515abef0d76eecb.tar.gz
spark-5ecb08ea063166564178885b7515abef0d76eecb.tar.bz2
spark-5ecb08ea063166564178885b7515abef0d76eecb.zip
Revert "[SPARK-2970] [SQL] spark-sql script ends with IOException when EventLogging is enabled"
Revert #1891 due to issues with hadoop 1 compatibility. Author: Michael Armbrust <michael@databricks.com> Closes #2007 from marmbrus/revert1891 and squashes the following commits: 68706c0 [Michael Armbrust] Revert "[SPARK-2970] [SQL] spark-sql script ends with IOException when EventLogging is enabled"
Diffstat (limited to 'sql/hive-thriftserver/src')
-rwxr-xr-xsql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala10
1 files changed, 2 insertions, 8 deletions
diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
index c16a7d3661..b092f42372 100755
--- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
+++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
@@ -26,8 +26,6 @@ import jline.{ConsoleReader, History}
import org.apache.commons.lang.StringUtils
import org.apache.commons.logging.LogFactory
import org.apache.hadoop.conf.Configuration
-import org.apache.hadoop.fs.FileSystem
-import org.apache.hadoop.util.ShutdownHookManager
import org.apache.hadoop.hive.cli.{CliDriver, CliSessionState, OptionsProcessor}
import org.apache.hadoop.hive.common.LogUtils.LogInitializationException
import org.apache.hadoop.hive.common.{HiveInterruptCallback, HiveInterruptUtils, LogUtils}
@@ -118,17 +116,13 @@ private[hive] object SparkSQLCLIDriver {
SessionState.start(sessionState)
// Clean up after we exit
- /**
- * This should be executed before shutdown hook of
- * FileSystem to avoid race condition of FileSystem operation
- */
- ShutdownHookManager.get.addShutdownHook(
+ Runtime.getRuntime.addShutdownHook(
new Thread() {
override def run() {
SparkSQLEnv.stop()
}
}
- , FileSystem.SHUTDOWN_HOOK_PRIORITY - 1)
+ )
// "-h" option has been passed, so connect to Hive thrift server.
if (sessionState.getHost != null) {