HBaseAdmin.disableTable/enableTable aren't synchronous
------------------------------------------------------

                 Key: HADOOP-2292
                 URL: https://issues.apache.org/jira/browse/HADOOP-2292
             Project: Hadoop
          Issue Type: Bug
          Components: contrib/hbase
    Affects Versions: 0.15.0
            Reporter: Michael Bieniosek


I'm trying to programmatically add a column family to a table.

I have code that looks like:

<code>
admin.disableTable(table);
try {
  admin.addColumn(table, new HColumnDescriptor(columnName));
} finally {
  admin.enableTable(table);
}

HTable ht = new HTable(config, table);
<code>

Two things sometimes go wrong here:

1. addColumn fails because the table is not disabled
2. new HTable() fails because the table is not enabled

I suspect that the enableTable/disableTable calls are not synchronous, ie. they 
return before they are finished.  I can work around this problem by inserting 
Thread.sleeps after the enableTable and disableTable calls.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to