Package org.apache.accumulo.test.util
Class SlowOps
- java.lang.Object
-
- org.apache.accumulo.test.util.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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
blockWhileCompactionRunning()
Will block as long as the underlying compaction task is running.String
getTableName()
void
setExpectedCompactions(int numParallelExpected)
void
startCompactTask()
Create and run a slow running compaction task.
-
-
-
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.
-
-