Skip to content

Commit

Permalink
Revert "[SPARK-22496][SQL] thrift server adds operation logs"
Browse files Browse the repository at this point in the history
This reverts commit 0ea2d8c.
  • Loading branch information
gatorsmile committed Dec 15, 2017
1 parent 3775dd3 commit e58f275
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
Expand Up @@ -23,7 +23,6 @@

import org.apache.hadoop.hive.ql.processors.CommandProcessor;
import org.apache.hadoop.hive.ql.processors.CommandProcessorFactory;
import org.apache.hadoop.hive.ql.session.OperationLog;
import org.apache.hive.service.cli.HiveSQLException;
import org.apache.hive.service.cli.OperationType;
import org.apache.hive.service.cli.session.HiveSession;
Expand Down Expand Up @@ -68,16 +67,4 @@ protected void setConfOverlay(Map<String, String> confOverlay) {
this.confOverlay = confOverlay;
}
}

protected void registerCurrentOperationLog() {
if (isOperationLogEnabled) {
if (operationLog == null) {
LOG.warn("Failed to get current OperationLog object of Operation: " +
getHandle().getHandleIdentifier());
isOperationLogEnabled = false;
return;
}
OperationLog.setCurrentOperationLog(operationLog);
}
}
}
Expand Up @@ -274,6 +274,18 @@ private Hive getSessionHive() throws HiveSQLException {
}
}

private void registerCurrentOperationLog() {
if (isOperationLogEnabled) {
if (operationLog == null) {
LOG.warn("Failed to get current OperationLog object of Operation: " +
getHandle().getHandleIdentifier());
isOperationLogEnabled = false;
return;
}
OperationLog.setCurrentOperationLog(operationLog);
}
}

private void cleanup(OperationState state) throws HiveSQLException {
setState(state);
if (shouldRunAsync()) {
Expand Down
Expand Up @@ -170,7 +170,6 @@ private[hive] class SparkExecuteStatementOperation(
override def run(): Unit = {
val doAsAction = new PrivilegedExceptionAction[Unit]() {
override def run(): Unit = {
registerCurrentOperationLog()
try {
execute()
} catch {
Expand Down

0 comments on commit e58f275

Please sign in to comment.