[ 
https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080517#comment-13080517
 ] 

Ted Yu commented on HBASE-4162:
-------------------------------

Currently createTableDescriptor() doesn't return anything.
The caller wouldn't know whether the descriptor is created or not. See 
exception handling:
{code}
    } catch(IOException ioe) {
      LOG.info("IOException while trying to create tableInfo in HDFS", ioe);
    }
{code}
We should return a boolean.

If the table descriptor exists already, maybe we should deserialize from hdfs 
and compare with htableDescriptor argument. If they differ, I am not sure what 
the proper action would be.

As I said in my comment @ 04/Aug/11 13:15, I didn't see how table descriptor 
for the same table would exist prior to calling createTableDescriptor().

If the user happens to call createTableDescriptor() twice, I am not sure how 
bad overwriting the first one would be.

Maybe we can add a boolean argument, force, to createTableDescriptor(). When 
force is true, existing table descriptor would be overwritten.

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it 
> already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0, 0.94.0
>
>         Attachments: 
> 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 
> 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch, 4162.txt
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it 
> already exists. Otherwise, the directory is not created and the unit test 
> fails trying to compare stale data from the previous test run to what it 
> expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to