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-7961) truncate on disabled table should throw TableNotEnabledException.
Date Sat, 06 Apr 2013 05:13:18 GMT

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

Lars Hofhansl updated HBASE-7961:
---------------------------------

    Fix Version/s: 0.95.0
    
> truncate on disabled table should throw TableNotEnabledException.
> -----------------------------------------------------------------
>
>                 Key: HBASE-7961
>                 URL: https://issues.apache.org/jira/browse/HBASE-7961
>             Project: HBase
>          Issue Type: Bug
>          Components: Admin
>            Reporter: rajeshbabu
>            Assignee: rajeshbabu
>             Fix For: 0.95.0, 0.98.0, 0.94.7
>
>         Attachments: HBASE-7961_94.patch, HBASE-7961.patch
>
>
> presently truncate on disabled table is deleting existing table and recreating(ENABLED)
> disable(table_name) call in truncate returing if table is disabled without nofifying
to user.
> {code}
>     def disable(table_name)
>       tableExists(table_name)
>       return if disabled?(table_name)
>       @admin.disableTable(table_name)
>     end
> {code}
> one more thing is we are calling tableExists in disable(table_name) as well as drop(table_name)
which is un necessary.
> Any way below HTable object creation will check whether table exists or not.
> {code}
> h_table = org.apache.hadoop.hbase.client.HTable.new(conf, table_name)
> {code}
> We can change it to 
> {code}
>       h_table = org.apache.hadoop.hbase.client.HTable.new(conf, table_name)
>       table_description = h_table.getTableDescriptor()
>       yield 'Disabling table...' if block_given?
>       @admin.disableTable(table_name)
>       yield 'Dropping table...' if block_given?
>       @admin.deleteTable(table_name)
>       yield 'Creating table...' if block_given?
>       @admin.createTable(table_description)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message