hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-11041) HBaseTestingUtil.createMultiRegions deals incorrectly with missing column family
Date Mon, 21 Apr 2014 18:34:15 GMT

     [ https://issues.apache.org/jira/browse/HBASE-11041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lars Hofhansl updated HBASE-11041:
----------------------------------

    Fix Version/s:     (was: 0.94.19)
                   0.94.20

> 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.98.2, 0.96.3, 0.94.20
>
>
> 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)

Mime
View raw message