public HRegionLocation getRegionLocation() {
    for (HRegionLocation loc : locations) {
      if (loc != null) {
        return loc;
      }
    }
    return null;
  }
Returns the first not-null region location in the list
hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLocations.java