[
https://issues.apache.org/jira/browse/HIVE-23800?focusedWorklogId=498131&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-498131
]
ASF GitHub Bot logged work on HIVE-23800:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Oct/20 13:42
Start Date: 09/Oct/20 13:42
Worklog Time Spent: 10m
Work Description: dengzhhu653 commented on a change in pull request #1205:
URL: https://github.com/apache/hive/pull/1205#discussion_r502158480
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/hooks/HookContext.java
##########
@@ -45,7 +47,50 @@
public class HookContext {
static public enum HookType {
- PRE_EXEC_HOOK, POST_EXEC_HOOK, ON_FAILURE_HOOK
+
Review comment:
Checked on my test and production env, it shows that the hooks compiled
for the old api can be reused without any changes with the new implementation.
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/HookRunner.java
##########
@@ -39,57 +36,27 @@
import org.apache.hadoop.hive.ql.parse.HiveSemanticAnalyzerHook;
import org.apache.hadoop.hive.ql.parse.HiveSemanticAnalyzerHookContext;
import org.apache.hadoop.hive.ql.session.SessionState;
-import org.apache.hadoop.hive.ql.session.SessionState.LogHelper;
import org.apache.hive.common.util.HiveStringUtils;
+import static org.apache.hadoop.hive.ql.hooks.HookContext.HookType.*;
+
/**
* Handles hook executions for {@link Driver}.
*/
public class HookRunner {
private static final String CLASS_NAME = Driver.class.getName();
private final HiveConf conf;
- private LogHelper console;
- private List<QueryLifeTimeHook> queryHooks = new ArrayList<>();
- private List<HiveSemanticAnalyzerHook> saHooks = new ArrayList<>();
- private List<HiveDriverRunHook> driverRunHooks = new ArrayList<>();
- private List<ExecuteWithHookContext> preExecHooks = new ArrayList<>();
- private List<ExecuteWithHookContext> postExecHooks = new ArrayList<>();
- private List<ExecuteWithHookContext> onFailureHooks = new ArrayList<>();
- private boolean initialized = false;
+ private final HooksLoader loader;
Review comment:
Rename it to HiveHooks instead.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 498131)
Time Spent: 5.5h (was: 5h 20m)
> Add hooks when HiveServer2 stops due to OutOfMemoryError
> --------------------------------------------------------
>
> Key: HIVE-23800
> URL: https://issues.apache.org/jira/browse/HIVE-23800
> Project: Hive
> Issue Type: Improvement
> Components: HiveServer2
> Reporter: Zhihua Deng
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 5.5h
> Remaining Estimate: 0h
>
> Make oom hook an interface of HiveServer2, so user can implement the hook to
> do something before HS2 stops, such as dumping the heap or altering the
> devops.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)