Skip to content

Commit e58f275

Browse files
committed
Revert "[SPARK-22496][SQL] thrift server adds operation logs"
This reverts commit 0ea2d8c.
1 parent 3775dd3 commit e58f275

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/ExecuteStatementOperation.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
import org.apache.hadoop.hive.ql.processors.CommandProcessor;
2525
import org.apache.hadoop.hive.ql.processors.CommandProcessorFactory;
26-
import org.apache.hadoop.hive.ql.session.OperationLog;
2726
import org.apache.hive.service.cli.HiveSQLException;
2827
import org.apache.hive.service.cli.OperationType;
2928
import org.apache.hive.service.cli.session.HiveSession;
@@ -68,16 +67,4 @@ protected void setConfOverlay(Map<String, String> confOverlay) {
6867
this.confOverlay = confOverlay;
6968
}
7069
}
71-
72-
protected void registerCurrentOperationLog() {
73-
if (isOperationLogEnabled) {
74-
if (operationLog == null) {
75-
LOG.warn("Failed to get current OperationLog object of Operation: " +
76-
getHandle().getHandleIdentifier());
77-
isOperationLogEnabled = false;
78-
return;
79-
}
80-
OperationLog.setCurrentOperationLog(operationLog);
81-
}
82-
}
8370
}

sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,18 @@ private Hive getSessionHive() throws HiveSQLException {
274274
}
275275
}
276276

277+
private void registerCurrentOperationLog() {
278+
if (isOperationLogEnabled) {
279+
if (operationLog == null) {
280+
LOG.warn("Failed to get current OperationLog object of Operation: " +
281+
getHandle().getHandleIdentifier());
282+
isOperationLogEnabled = false;
283+
return;
284+
}
285+
OperationLog.setCurrentOperationLog(operationLog);
286+
}
287+
}
288+
277289
private void cleanup(OperationState state) throws HiveSQLException {
278290
setState(state);
279291
if (shouldRunAsync()) {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ private[hive] class SparkExecuteStatementOperation(
170170
override def run(): Unit = {
171171
val doAsAction = new PrivilegedExceptionAction[Unit]() {
172172
override def run(): Unit = {
173-
registerCurrentOperationLog()
174173
try {
175174
execute()
176175
} catch {

0 commit comments

Comments
 (0)