Ejemplo n.º 1
0
 private void printLocations(Result r) {
   RegionLocations rl = null;
   if (r == null) {
     LOG.info("FAILED FOR null Result");
     return;
   }
   LOG.info("FAILED FOR " + resultToString(r) + " Stale " + r.isStale());
   if (r.getRow() == null) {
     return;
   }
   try {
     rl = ((ClusterConnection) connection).locateRegion(tableName, r.getRow(), true, true);
   } catch (IOException e) {
     LOG.warn("Couldn't get locations for row " + Bytes.toString(r.getRow()));
   }
   HRegionLocation locations[] = rl.getRegionLocations();
   for (HRegionLocation h : locations) {
     LOG.info("LOCATION " + h);
   }
 }