[
https://issues.apache.org/jira/browse/TRAFODION-2722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16133716#comment-16133716
]
ASF GitHub Bot commented on TRAFODION-2722:
-------------------------------------------
Github user anoopsharma00 commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/1211#discussion_r134067051
--- Diff: core/sql/src/main/java/org/trafodion/sql/HBaseClient.java ---
@@ -648,6 +648,8 @@ public boolean truncate(String tblName, boolean
preserveSplits, long transID)
}
else {
TableName tableName = TableName.valueOf(tblName);
+ if (admin.isTableEnabled(tableName))
+ admin.disableTable(tableName);
--- End diff --
HBase truncate api requires table to be disabled.
truncate api enables the table after truncation.
> change purgedata to use hbase truncate api instead of drop/create
> -----------------------------------------------------------------
>
> Key: TRAFODION-2722
> URL: https://issues.apache.org/jira/browse/TRAFODION-2722
> Project: Apache Trafodion
> Issue Type: Improvement
> Reporter: Anoop Sharma
> Assignee: Anoop Sharma
> Priority: Minor
>
> currently, traf purgedata command runs by first dropping underlying hbase
> objects for a table and its associated indexes, and then recreating them.
> At recreation time, the original hbase options and keys are used.
> drop/create was done during early days of traf when hbase didn't provide an
> api
> to truncate objects.
> Now that the truncate api is available, this jira proposes changing code to
> use it
> instead of drop/create. This would improve performance as well as avoid the
> need
> to recreate using the original options.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)