docs: private Scanner getScanner(final int salt) {
      final Scanner scanner = tsdb.getClient().newScanner(
          query.useMeta() ? tsdb.metaTable() : tsdb.dataTable());
      scanner.setFamily(query.useMeta() ? TSMeta.FAMILY : TSDB.FAMILY());
      
      if (metric_uid != null) {
        byte[] key;
        if (query.useMeta() || Const.SALT_WIDTH() < 1) {
          key = metric_uid;
        } else {
          key = new byte[Const.SALT_WIDTH() + TSDB.metrics_width()];
          System.arraycopy(RowKey.getSaltBytes(salt), 0, key, 0, Const.SALT_WIDTH());
          System.arraycopy(metric_uid, 0, key, Const.SALT_WIDTH(), metric_uid.length);
        }
        scanner.setStartKey(key);
        long uid = UniqueId.uidToLong(metric_uid, TSDB.metrics_width());
        uid++;
        if (uid < Internal.getMaxUnsignedValueOnBytes(TSDB.metrics_width())) {
          // if random metrics are enabled we could see a metric with the max UID
          // value. If so, we need to leave the stop key as null
          if (query.useMeta() || Const.SALT_WIDTH() < 1) {
            key = UniqueId.longToUID(uid, TSDB.metrics_width());
          } else {
            key = new byte[Const.SALT_WIDTH() + TSDB.metrics_width()];
            System.arraycopy(RowKey.getSaltBytes(salt), 0, key, 0, Const.SALT_WIDTH());
            System.arraycopy(UniqueId.longToUID(uid, TSDB.metrics_width()), 0, 
                key, Const.SALT_WIDTH(), metric_uid.length);
          }
          scanner.setStopKey(key);  
        }
      }
      
      if (rowkey_regex != null) {
        scanner.setKeyRegexp(rowkey_regex, CHARSET);
        if (LOG.isDebugEnabled()) {
          LOG.debug("Scanner regex: " + QueryUtil.byteRegexToString(rowkey_regex));
        }
      }
      
      return scanner;
    }