public static boolean isReadOnly(HRegion region) {
    return region.getTableDescriptor().isReadOnly() || !isDefaultReplica(region.getRegionInfo());
  }
Returns whether this region replica can accept writes.
@param region the HRegion object
@return whether the replica is read only
hbase-server/src/main/java/org/apache/hadoop/hbase/util/ServerRegionReplicaUtil.java