Lars Hofhansl created HBASE-11041:
-------------------------------------
Summary: HBaseTestingUtil.createMultiRegions deals incorrectly
with missing column family
Key: HBASE-11041
URL: https://issues.apache.org/jira/browse/HBASE-11041
Project: HBase
Issue Type: Bug
Reporter: Lars Hofhansl
Fix For: 0.99.0, 0.94.19, 0.98.2, 0.96.3
Just found a test failing like this:
{code}
Error Message
HTableDescriptor is read-only
Stacktrace
java.lang.UnsupportedOperationException: HTableDescriptor is read-only
at
org.apache.hadoop.hbase.client.UnmodifyableHTableDescriptor.addFamily(UnmodifyableHTableDescriptor.java:64)
at
org.apache.hadoop.hbase.HBaseTestingUtility.createMultiRegions(HBaseTestingUtility.java:1302)
at
org.apache.hadoop.hbase.HBaseTestingUtility.createMultiRegions(HBaseTestingUtility.java:1291)
at
org.apache.hadoop.hbase.HBaseTestingUtility.createMultiRegions(HBaseTestingUtility.java:1286)
at
org.apache.hadoop.hbase.master.TestDistributedLogSplitting.installTable(TestDistributedLogSplitting.java:485)
at
org.apache.hadoop.hbase.master.TestDistributedLogSplitting.testMasterStartsUpWithLogSplittingWork(TestDistributedLogSplitting.java:282)
{code}
The code that causes this looks like this:
{code}
HTableDescriptor htd = table.getTableDescriptor();
if(!htd.hasFamily(columnFamily)) {
HColumnDescriptor hcd = new HColumnDescriptor(columnFamily);
htd.addFamily(hcd);
}
{code}
But note that table.getTableDescriptor() returns an
UnmodifyableHTableDescriptor, so the add would *always* fail.
The specific test that failed was
TestDistributedLogSplitting.testMasterStartsUpWithLogSplittingWork.
Looks like the HMaster did not have the last table descriptor state, yet.
--
This message was sent by Atlassian JIRA
(v6.2#6252)