Class SlowOps


  • public class SlowOps
    extends Object
    Common methods for performing operations that are deliberately take some period of time so that tests can interact while the operations are in progress.
    • Constructor Detail

      • SlowOps

        public SlowOps​(Connector connector,
                       String tableName,
                       long maxWait,
                       int numParallelExpected)
    • Method Detail

      • setExpectedCompactions

        public void setExpectedCompactions​(int numParallelExpected)
      • getTableName

        public String getTableName()
      • startCompactTask

        public void startCompactTask()
        Create and run a slow running compaction task. The method will block until the compaction has been started. The compaction should be cancelled using Accumulo tableOps, and then the caller can use blockWhileCompactionRunning() on the instance of this class.
      • blockWhileCompactionRunning

        public boolean blockWhileCompactionRunning()
        Will block as long as the underlying compaction task is running. This method is intended to be used when the the compaction is cancelled via table operation cancel method - when the cancel command completed, the running task will terminate and then this method will return.
        Returns:
        true if the task returned.