[
https://issues.apache.org/jira/browse/HBASE-13572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14514094#comment-14514094
]
Matteo Bertozzi commented on HBASE-13572:
-----------------------------------------
yeah, sorry. I didn't really mean use CreateTableFuture directly.
my comment was more on the line of extending it (and fixing it) to reuse as
much as possible.
with the v1 approach there are two obvious things that are wrong.
you'll see a "Created tableName" instead of "Truncated"
and the splitKeys passed to the CreateTableFuture are the wrong ones in case
preserveSplits is false.
first thing I'll do, will be change waitForTableEnabled() to protected, same
for waitForAllRegionsOnline() but in this case also adding the splitKeys as
argument. then have a TruncateFuture extending CreateFuture and having the
waitOperationResult() to look more or less like waitForTableEnabled() +
waitForAllRegionsOnline(getRegionSplits()).
For the log.info("created/truncated/deleted") you may also think to have a
"description" field or method or something to pass to the base ProcedureFuture
and let it print that.
I know that this looks more work than you expected, but if you have the chance
to improve what we have to reduce the code for the next implementor you should
do it. (for example HBASE-13571 and HBASE-13538 that are exactly the same thing
of this one will benefit from the cleanup done here)
> Procedure v2 - client truncate table sync
> -----------------------------------------
>
> Key: HBASE-13572
> URL: https://issues.apache.org/jira/browse/HBASE-13572
> Project: HBase
> Issue Type: Sub-task
> Components: proc-v2
> Reporter: Srikanth Srungarapu
> Assignee: Ashish Singhi
> Priority: Minor
> Attachments: HBASE-13572-v1.patch, HBASE-13575.patch
>
>
> Client side part of HBASE-13455.
> It uses the new procedure code to be know when the procedure is completed,
> and have a proper sync/async behavior on truncate table.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)