Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-25655

Remove ElapsedTimeLoggingWrapper from tests

    XMLWordPrintableJSON

Details

    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

          Activity

            People

              zabetak Stamatis Zampetakis
              zabetak Stamatis Zampetakis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m