Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this back.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, thanks

import java.util.concurrent.*;

import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
Expand Down Expand Up @@ -80,7 +76,6 @@ public synchronized void init(HiveConf hiveConf) {
}
createBackgroundOperationPool();
addService(operationManager);
super.init(hiveConf);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I think we revert keep this line too.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we could keep super.init() here and remove initCompositeService in SparkSQLSessionManager.init(). thanks

}

private void createBackgroundOperationPool() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,8 @@ private[hive] class SparkSQLSessionManager(hiveServer: HiveServer2, sqlContext:
private lazy val sparkSqlOperationManager = new SparkSQLOperationManager()

override def init(hiveConf: HiveConf) {
setSuperField(this, "hiveConf", hiveConf)

// Create operation log root directory, if operation logging is enabled
if (hiveConf.getBoolVar(ConfVars.HIVE_SERVER2_LOGGING_OPERATION_ENABLED)) {
invoke(classOf[SessionManager], this, "initOperationLogRootDir")
}

val backgroundPoolSize = hiveConf.getIntVar(ConfVars.HIVE_SERVER2_ASYNC_EXEC_THREADS)
setSuperField(this, "backgroundOperationPool", Executors.newFixedThreadPool(backgroundPoolSize))
getAncestorField[Log](this, 3, "LOG").info(
s"HiveServer2: Async execution pool size $backgroundPoolSize")

setSuperField(this, "operationManager", sparkSqlOperationManager)
addService(sparkSqlOperationManager)

super.init(hiveConf)
initCompositeService(hiveConf)
}

Expand Down