LOG.debug("GET " + uriInfo.getAbsolutePath());
}
servlet.getMetrics().incrementRequests(1);
try {
String tableName = tableResource.getName();
TableInfoModel model = new TableInfoModel(tableName);
Map<HRegionInfo,ServerName> regions = MetaScanner.allTableRegions(
servlet.getConfiguration(), null, Bytes.toBytes(tableName), false);
for (Map.Entry<HRegionInfo,ServerName> e: regions.entrySet()) {
HRegionInfo hri = e.getKey();
ServerName addr = e.getValue();
model.add(
new TableRegionModel(tableName, hri.getRegionId(),
hri.getStartKey(), hri.getEndKey(), addr.getHostAndPort()));
}
ResponseBuilder response = Response.ok(model);
response.cacheControl(cacheControl);