hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matteo Bertozzi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-15209) disable table in HBaseTestingUtility.truncateTable
Date Wed, 03 Feb 2016 03:22:39 GMT

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

Matteo Bertozzi commented on HBASE-15209:
-----------------------------------------

the current HTU.truncateTable() has nothing to do with the old truncate (pre HBASE-13764,
< 1.0).
The "old truncate" is now deleteTableData() and it was removing row by row with Deletes. the
new truncate is just a call to admin.truncate.

The only user or HTU.truncateTable() is AccessController and it does not even use/close the
returned Table instance. I'd say we can remove that method and force everyone to use Admin
as they do for the other operations.

but patch looks ok, since at least follows the comment that is there "Effectively disables,
deletes, and recreates the table."

> disable table in HBaseTestingUtility.truncateTable 
> ---------------------------------------------------
>
>                 Key: HBASE-15209
>                 URL: https://issues.apache.org/jira/browse/HBASE-15209
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Appy
>            Assignee: Appy
>            Priority: Minor
>              Labels: compatibility
>             Fix For: 2.0.0, 1.2.0
>
>         Attachments: HBASE-15209-v1.patch
>
>
> Old truncate table expected table to be enabled and removed rows by scanning over them.
> In HBASE-13764, the function was changed to make it consistent with how shell worked,
so new one used admin.truncateTable.
> Since HBTU.truncateTable expects table to be enabled (backward compat) whereas admin.truncateTable
expects table to be disabled, we should add a disable table there.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message