You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2021/10/27 14:07:00 UTC
[jira] [Created] (HIVE-25655) Remove ElapsedTimeLoggingWrapper from
tests
Stamatis Zampetakis created HIVE-25655:
------------------------------------------
Summary: 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
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)