You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/10/27 14:18:00 UTC

[jira] [Work logged] (HIVE-25655) Remove ElapsedTimeLoggingWrapper from tests

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

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

                Author: ASF GitHub Bot
            Created on: 27/Oct/21 14:17
            Start Date: 27/Oct/21 14:17
    Worklog Time Spent: 10m 
      Work Description: zabetak opened a new pull request #2755:
URL: https://github.com/apache/hive/pull/2755


   ### What changes were proposed in this pull request?
   Remove ElapsedTimeLoggingWrapper and its usages since the benefit of logging times in before/after methods is subtle.
   
   ### Why are the changes needed?
   1. Improve code readability
   2. Reduce maintenance overhead
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   Refactoring so no new tests needed.


-- 
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-unsubscribe@hive.apache.org

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


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

            Worklog Id:     (was: 670751)
    Remaining Estimate: 0h
            Time Spent: 10m

> Remove ElapsedTimeLoggingWrapper from tests
> -------------------------------------------
>
>                 Key: HIVE-25655
>                 URL: https://issues.apache.org/jira/browse/HIVE-25655
>             Project: Hive
>          Issue Type: Task
>          Components: Testing Infrastructure
>    Affects Versions: 4.0.0
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The  [ElapsedTimeLoggingWrapper|https://github.com/apache/hive/blob/f749ef2af27638914984c183bcfa213920f5cdd9/itests/util/src/main/java/org/apache/hadoop/hive/util/ElapsedTimeLoggingWrapper.java] introduced in HIVE-14625 is used by the [CoreCliDriver|#L68] to execute, measure, and display the time spend on some operations during the execution of {{@Before/@After}} methods. 
> The benefit of logging the elapsed time for these methods is unclear. The time is usually rather short, especially compared to the actual time a query takes to run,  so it is not an information which can be of much use.
> The enforced coding pattern for measuring and logging the time leads to boilerplate and makes the code harder to read and understand. 
> {code:java}
> qt = new ElapsedTimeLoggingWrapper<QTestUtil>() {
>       @Override
>       public QTestUtil invokeInternal() throws Exception {
>         return new QTestUtil(
>             QTestArguments.QTestArgumentsBuilder.instance()
>               .withOutDir(cliConfig.getResultsDir())
>               .withLogDir(cliConfig.getLogDir())
>               .withClusterType(miniMR)
>               .withConfDir(hiveConfDir)
>               .withInitScript(initScript)
>               .withCleanupScript(cleanupScript)
>               .withLlapIo(true)
>               .withFsType(cliConfig.getFsType())
>               .build());
>       }
>     }.invoke("QtestUtil instance created", LOG, true);
> {code}
> Moreover, the wrapper is not used consistently across drivers making results less uniform.
> The goal of this issue is to remove {{ElapsedTimeLoggingWrapper}} and its usages to improve code readability and maintenance.



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