Details
-
Task
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
4.0.0
Description
The ElapsedTimeLoggingWrapper introduced in HIVE-14625 is used by the CoreCliDriver 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.
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);
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.
Attachments
Issue Links
- links to