[
https://issues.apache.org/jira/browse/HBASE-7961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13626345#comment-13626345
]
Hudson commented on HBASE-7961:
-------------------------------
Integrated in HBase-0.94-security #133 (See
[https://builds.apache.org/job/HBase-0.94-security/133/])
HBASE-7961 truncate on disabled table should throw
TableNotEnabledException. (rajeshbabu) (Revision 1465186)
Result = SUCCESS
larsh :
Files :
* /hbase/branches/0.94/src/main/ruby/hbase/admin.rb
> 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.98.0, 0.94.7, 0.95.0
>
> 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