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

Drop support of multiple qfiles in QTestUtil, output and result processors

    XMLWordPrintableJSON

Details

    Description

      The current implementation of QTestUtil, QOutProcessor, and QTestResultProcessor, has some methods and fields (maps) for managing multiple input files. However, all clients of this API, such as CoreCliDriver, use these classes by processing one file per run.

      Example

      public void runTest(String testName, String fname, String fpath) {
          ...
          qt.addFile(fpath);
          qt.cliInit(new File(fpath));
          ...
          try {
            qt.executeClient(fname);
          } catch (CommandProcessorException e) {
            qt.failedQuery(e.getCause(), e.getResponseCode(), fname, QTestUtil.DEBUG_HINT);
          }
          ...
      }
      

      Notice that qt.addFile will keep accumulating input files to memory (filename + content) while qt.executeClient (and other similar APIs) always operate on the last file added. Apart from wasting memory, the APIs for multiple files are harder to understand, and extend.

      The goal of this JIRA is to simplify the aforementioned APIs by removing unused/redundant parts associated to multiple files to improve code readability, and reduce memory consumption.

      Historical note
      Before HIVE-25625 the functionality of multiple input files was used by the TestCompareCliDriver but it was still useless for all the other clients. With the removal of TestCompareCliDriver in HIVE-25625 keeping multiple files is completely redundant.

      Attachments

        Issue Links

          Activity

            People

              zabetak Stamatis Zampetakis
              zabetak Stamatis Zampetakis
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 50m
                  50m