Added debug to figure why this TestRegionServerCoprocessorExceptionWithRemove is failing with ArrayIndexOutOfBoundsException though we just checked the List size is > 0
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1190080 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bf0f06c569
commit
2e6de1360a
|
@ -1123,10 +1123,14 @@ public class HBaseTestingUtility {
|
|||
public HRegionServer getRSForFirstRegionInTable(byte[] tableName)
|
||||
throws IOException {
|
||||
List<byte[]> metaRows = getMetaTableRows(tableName);
|
||||
if (metaRows == null || metaRows.size() == 0) {
|
||||
if (metaRows == null || metaRows.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
int index = hbaseCluster.getServerWith(metaRows.get(0));
|
||||
LOG.debug("Found " + metaRows.size() + " rows for table " +
|
||||
Bytes.toString(tableName));
|
||||
byte [] firstrow = metaRows.get(0);
|
||||
LOG.debug("FirstRow=" + Bytes.toString(firstrow));
|
||||
int index = hbaseCluster.getServerWith(firstrow);
|
||||
return hbaseCluster.getRegionServerThreads().get(index).getRegionServer();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue