Class CompactionService
java.lang.Object
org.apache.hadoop.hdds.utils.BackgroundService
org.apache.hadoop.ozone.om.service.CompactionService
public class CompactionService
extends org.apache.hadoop.hdds.utils.BackgroundService
This is the background service to compact OM rocksdb tables.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hdds.utils.BackgroundService
org.apache.hadoop.hdds.utils.BackgroundService.PeriodicalTask -
Constructor Summary
ConstructorsConstructorDescriptionCompactionService(OzoneManager ozoneManager, TimeUnit unit, long interval, long timeout, List<String> tables) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcompactFully(String tableName) longReturns the number of manual compactions performed.org.apache.hadoop.hdds.utils.BackgroundTaskQueuegetTasks()voidresume()Resume the service if suspended (for testing).voidsuspend()Suspend the service (for testing).Methods inherited from class org.apache.hadoop.hdds.utils.BackgroundService
execTaskCompletion, getExecutorService, getFuture, getIntervalMillis, getThreadCount, runPeriodicalTaskNow, setInterval, setPoolSize, setServiceTimeoutInNanos, shutdown, start
-
Constructor Details
-
CompactionService
public CompactionService(OzoneManager ozoneManager, TimeUnit unit, long interval, long timeout, List<String> tables)
-
-
Method Details
-
suspend
public void suspend()Suspend the service (for testing). -
resume
public void resume()Resume the service if suspended (for testing). -
getCompactableTables
-
getNumCompactions
public long getNumCompactions()Returns the number of manual compactions performed.- Returns:
- long count.
-
getTasks
public org.apache.hadoop.hdds.utils.BackgroundTaskQueue getTasks()- Specified by:
getTasksin classorg.apache.hadoop.hdds.utils.BackgroundService
-
compactFully
- Throws:
IOException
-