private static void writeRegionInfoFileContent(final Configuration conf, final FileSystem fs,
    final Path regionInfoFile, final byte[] content) throws IOException {
    // First check to get the permissions
    FsPermission perms = CommonFSUtils.getFilePermissions(fs, conf, HConstants.DATA_FILE_UMASK_KEY);
    // Write the RegionInfo file content
    try (FSDataOutputStream out = FSUtils.create(conf, fs, regionInfoFile, perms, null)) {
      out.write(content);
    }
  }
Write the .regioninfo file on-disk.
<p/>
Overwrites if exists already.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java