public void loadLastFlushedSequenceIds() throws IOException {
    if (!persistFlushedSequenceId) {
      return;
    }
    Configuration conf = master.getConfiguration();
    Path rootDir = CommonFSUtils.getRootDir(conf);
    Path lastFlushedSeqIdPath = new Path(rootDir, LAST_FLUSHED_SEQ_ID_FILE);
    FileSystem fs = FileSystem.get(conf);
    if (!fs.exists(lastFlushedSeqIdPath)) {
      LOG.info("No .lastflushedseqids found at " + lastFlushedSeqIdPath
        + " will record last flushed sequence id"
        + " for regions by regionserver report all over again");
      return;
    } else {
      LOG.info("begin to load .lastflushedseqids at " + lastFlushedSeqIdPath);
    }
    FSDataInputStream in = fs.open(lastFlushedSeqIdPath);
    try {
      FlushedSequenceId flushedSequenceId = FlushedSequenceId.parseDelimitedFrom(in);
      if (flushedSequenceId == null) {
        LOG.info(".lastflushedseqids found at {} is empty", lastFlushedSeqIdPath);
        return;
      }
      for (FlushedRegionSequenceId flushedRegionSequenceId : flushedSequenceId
        .getRegionSequenceIdList()) {
        byte[] encodedRegionName = flushedRegionSequenceId.getRegionEncodedName().toByteArray();
        flushedSequenceIdByRegion.putIfAbsent(encodedRegionName,
          flushedRegionSequenceId.getSeqId());
        if (
          flushedRegionSequenceId.getStoresList() != null
            && flushedRegionSequenceId.getStoresList().size() != 0
        ) {
          ConcurrentNavigableMap<byte[], Long> storeFlushedSequenceId =
            computeIfAbsent(storeFlushedSequenceIdsByRegion, encodedRegionName,
              () -> new ConcurrentSkipListMap<>(Bytes.BYTES_COMPARATOR));
          for (FlushedStoreSequenceId flushedStoreSequenceId : flushedRegionSequenceId
            .getStoresList()) {
            storeFlushedSequenceId.put(flushedStoreSequenceId.getFamily().toByteArray(),
              flushedStoreSequenceId.getSeqId());
          }
        }
      }
    } finally {
      in.close();
    }
  }
Load last flushed sequence id of each region from HDFS, if persisted
hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java