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

Skip hbase:meta table scan if the normalizer not enabled for any of the tables as well as default table wise normalization disabled

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Normalizer
    • None

    Description

      Currently when the zk data is null considering normaliser on which leads to unnecessary hbase meta scans. Would be better to scan through meta only when normalizer enabled explictly.

        public boolean isNormalizerOn() {
          byte[] upData = super.getData(false);
          try {
            // if data in ZK is null, use default of on.
            return upData == null || parseFrom(upData).getNormalizerOn();
          } catch (DeserializationException dex) {
            LOG
              .error("ZK state for RegionNormalizer could not be parsed " + Bytes.toStringBinary(upData));
            // return false to be safe.
            return false;
          }
        }
      
        public boolean normalizeRegions(final NormalizeTableFilterParams ntfp,
          final boolean isHighPriority) throws IOException {
          if (regionNormalizerManager == null || !regionNormalizerManager.isNormalizerOn()) {
            LOG.debug("Region normalization is disabled, don't run region normalizer.");
            return false;
          }
          if (skipRegionManagementAction("region normalizer")) {
            return false;
          }
          if (assignmentManager.hasRegionsInTransition()) {
            return false;
          }
      
          final Set<TableName> matchingTables = getTableDescriptors(new LinkedList<>(),
            ntfp.getNamespace(), ntfp.getRegex(), ntfp.getTableNames(), false).stream()
              .map(TableDescriptor::getTableName).collect(Collectors.toSet());
          final Set<TableName> allEnabledTables =
            tableStateManager.getTablesInStates(TableState.State.ENABLED);
      

      Attachments

        Activity

          People

            rajeshbabu Rajeshbabu Chintaguntla
            rajeshbabu Rajeshbabu Chintaguntla
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: