[
https://issues.apache.org/jira/browse/HBASE-27077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17544125#comment-17544125
]
Duo Zhang commented on HBASE-27077:
-----------------------------------
IIRC, for split/merge, when the returned CompletableFuture is marked as
completed, it means the split/merge is completed.
For compaction it is another story as we do not have a procedure for
compaction, and I suggest we introduce some methods in HBTU instead of
AsyncAdmin, as in UT it is easier to just get the HRegion instance and check
whether the compaction is complete.
Thanks.
> Synchronous API calls for Split, Merge, and Compaction operations for testing
> -----------------------------------------------------------------------------
>
> Key: HBASE-27077
> URL: https://issues.apache.org/jira/browse/HBASE-27077
> Project: HBase
> Issue Type: Improvement
> Reporter: Istvan Toth
> Priority: Major
>
> While generally split, merge, and compaction operations are too slow for
> synchrounous calls, for many tests we do need to wait until these operations
> are finished to be able to check their results.
> At least in the Phoenix tests, we also need to to do this while the
> EnvirenmentEdge clock is stopped.
> The polling method Admin.getLastMajorCompactionTimestamp() the we used for
> compactions has stopped working with EnvironmentEdgeManager in 2.5, see
> HBASE-27058 for details. We've also had similar issues in the past, where new
> versions made the previous workaround for synchronous operations fail.
> A longer-term solution for the problem would be having Synchronous API calls
> for testing, which block on the client side until the requested operation is
> finished.
> These could be added as variants to Admin / AsyncAdmin, or could be somewhere
> else, it doesn't really matter, as these would not be well suited for
> production use anyway.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)