public static MasterRegion create(Server server) throws IOException {
    Configuration conf = server.getConfiguration();
    MasterRegionParams params = new MasterRegionParams().server(server)
      .regionDirName(MASTER_STORE_DIR).tableDescriptor(withTrackerConfigs(conf));
    long flushSize = conf.getLong(FLUSH_SIZE_KEY, DEFAULT_FLUSH_SIZE);
    long flushPerChanges = conf.getLong(FLUSH_PER_CHANGES_KEY, DEFAULT_FLUSH_PER_CHANGES);
    long flushIntervalMs = conf.getLong(FLUSH_INTERVAL_MS_KEY, DEFAULT_FLUSH_INTERVAL_MS);
    int compactMin = conf.getInt(COMPACT_MIN_KEY, DEFAULT_COMPACT_MIN);
    params.flushSize(flushSize).flushPerChanges(flushPerChanges).flushIntervalMs(flushIntervalMs)
      .compactMin(compactMin);
    int maxWals = conf.getInt(MAX_WALS_KEY, DEFAULT_MAX_WALS);
    params.maxWals(maxWals);
    if (conf.get(USE_HSYNC_KEY) != null) {
      params.useHsync(conf.getBoolean(USE_HSYNC_KEY, false));
    }
    params.ringBufferSlotCount(conf.getInt(RING_BUFFER_SLOT_COUNT, DEFAULT_RING_BUFFER_SLOT_COUNT));
    long rollPeriodMs = conf.getLong(ROLL_PERIOD_MS_KEY, DEFAULT_ROLL_PERIOD_MS);
    params.rollPeriodMs(rollPeriodMs).archivedWalSuffix(ARCHIVED_WAL_SUFFIX)
      .archivedHFileSuffix(ARCHIVED_HFILE_SUFFIX);
    return MasterRegion.create(params);
  }
The factory class for creating a {@link MasterRegion}.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/region/MasterRegionFactory.java