[ 
https://issues.apache.org/jira/browse/HIVE-25048?focusedWorklogId=634345&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-634345
 ]

ASF GitHub Bot logged work on HIVE-25048:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Aug/21 11:40
            Start Date: 05/Aug/21 11:40
    Worklog Time Spent: 10m 
      Work Description: kgyrtkirk commented on a change in pull request #2441:
URL: https://github.com/apache/hive/pull/2441#discussion_r682695432



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
##########
@@ -61,6 +66,7 @@ public Result(Object result, int numRetries) {
 
   private final Configuration origConf;            // base configuration
   private final Configuration activeConf;  // active configuration
+  private final List<MetaStoreEndFunctionListener> endFunctionListeners; // 
the end function listener

Review comment:
       didn't know we had something like this :)
   
   but having only `MetaStoreEndFunctionListener` seems a bit odd;
   
   how about:
   * introduce a `MetaStoreFunctionListener`
   * keep the `MetaStoreEndFunctionListener` interface but extend the new 
interface with default implementation of `startFunction`
   * move the old logging/counting stuff into a `MetaStoreFunctionListener`
   
   just an idea; let me know what you think!

##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
##########
@@ -202,6 +215,8 @@ public Result invokeInternal(final Object proxy, final 
Method method, final Obje
           LOG.error(ExceptionUtils.getStackTrace(e.getCause()));
           throw e.getCause();
         }
+      } finally {
+        endFunction(method, object, ex, args);

Review comment:
       I think we could place the `startFunctions` here as well - now we have 1 
part here and the other there... 
   I don't think we will break much things if we do that - or do you think that 
could cause some trouble?




-- 
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.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 634345)
    Time Spent: 4h  (was: 3h 50m)

> Refine the start/end functions in HMSHandler
> --------------------------------------------
>
>                 Key: HIVE-25048
>                 URL: https://issues.apache.org/jira/browse/HIVE-25048
>             Project: Hive
>          Issue Type: Improvement
>          Components: Standalone Metastore
>            Reporter: Zhihua Deng
>            Assignee: Zhihua Deng
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 4h
>  Remaining Estimate: 0h
>
> Some start/end functions are incomplete or wrong in the HMSHandler, these 
> functions audit actions, monitor the performance, and notify the end function 
> listeners. We have already measured the performance of the HMSHandler in 
> PerfLogger,  and covered more methods than these functions that have done, so 
> we can remove the monitoring from the start/end functions, move the end 
> function listeners to the RetryingHMSHandler to eliminate the try-finally 
> blocks that spread across many different methods. After these, we can try to 
> cleanup the functions to make HMSHandler be more simplified.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to