Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-19675

Miscellaneous HStore Class Improvements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha-1
    • 2.0.0-beta-2, 2.0.0
    • None
    • None
    • Patch

    Description

      • Remove logging code guards in favor of slf4j parameters
      • Use CollectionsUtils.isEmpty() consistently
      • Small check-style fixes
      • Remove flow control logic from trace statement
                  if (LOG.isTraceEnabled()) {
                    LOG.trace("No compacted files to archive");
                    return;
                  }
      • Replace two calls to the same getter to ensure that the value doesn't change between calls
              if (getCompactedFiles() != null) {
                for (HStoreFile file : getCompactedFiles()) {
                  name2File.put(file.getFileInfo().getActiveFileName(), file);
                }
              }
      • Make 'inputFiles' a Set for fast calls to contains method instead
            //some of the input files might already be deleted
            List<HStoreFile> inputStoreFiles = new ArrayList<>(compactionInputs.size());
            for (HStoreFile sf : this.getStorefiles()) {
              if (inputFiles.contains(sf.getPath().getName())) {
                inputStoreFiles.add(sf);
              }
            }

      Attachments

        1. HBASE-19675.2.patch
          21 kB
          David Mollitor
        2. HBASE-19675.1.patch
          21 kB
          David Mollitor

        Issue Links

          Activity

            People

              belugabehr David Mollitor
              belugabehr David Mollitor
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: