[
https://issues.apache.org/jira/browse/HBASE-27077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17544121#comment-17544121
]
Istvan Toth commented on HBASE-27077:
-------------------------------------
For example, if using AsyncAdmin, we could add something like
AsyncAdmin.compactAndWait(), where the future is really tied to the
compaction's completion, but similar calls could be added to Admin, which could
simply block.
> 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)