private void checkReadsEnabled() throws IOException {
    if (!this.writestate.readsEnabled) {
      throw new IOException(getRegionInfo().getEncodedName()
        + ": The region's reads are disabled. Cannot serve the request");
    }
  }
@throws IOException Throws exception if region is in read-only mode.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java