You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2011/10/28 01:17:02 UTC
svn commit: r1190081 -
/hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Author: stack
Date: Thu Oct 27 23:17:01 2011
New Revision: 1190081
URL: http://svn.apache.org/viewvc?rev=1190081&view=rev
Log:
Added debug to figure why this TestRegionServerCoprocessorExceptionWithRemove is failing with ArrayIndexOutOfBoundsException though we just checked the List size is > 0
Modified:
hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Modified: hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1190081&r1=1190080&r2=1190081&view=diff
==============================================================================
--- hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java (original)
+++ hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java Thu Oct 27 23:17:01 2011
@@ -1103,10 +1103,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();
}