Class SimpleCompactionDispatcher
- java.lang.Object
-
- org.apache.accumulo.core.spi.compaction.SimpleCompactionDispatcher
-
- All Implemented Interfaces:
CompactionDispatcher
public class SimpleCompactionDispatcher extends Object implements CompactionDispatcher
Dispatcher that supports simple configuration for making tables use compaction services. By default it dispatches to a compction service named default.The following schema is supported for configration options.
table.compaction.dispatcher.opts.service[.user[.<user type>]|selected|system|chop]= <service>The following configuration will make a table use compaction service cs9 for user compactions, service cs4 for chop compactions, and service cs7 for everything else.
table.compaction.dispatcher.opts.service=cs7 table.compaction.dispatcher.opts.service.user=cs9 table.compaction.dispatcher.opts.service.chop=cs4Compactions started using the client API are called user compactions and can set execution hints using
CompactionConfig.setExecutionHints(Map). Hints of the formcompaction_type=<user type>can be used by this dispatcher. For example the following will use service cs2 when the hintcompaction_type=urgentis seen, service cs3 when hintcompaction_type=trifling, everything else uses cs9.table.compaction.dispatcher.opts.service=cs9 table.compaction.dispatcher.opts.service.user.urgent=cs2 table.compaction.dispatcher.opts.service.user.trifling=cs3- See Also:
org.apache.accumulo.core.spi.compaction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.accumulo.core.spi.compaction.CompactionDispatcher
CompactionDispatcher.DispatchParameters, CompactionDispatcher.InitParameters
-
-
Constructor Summary
Constructors Constructor Description SimpleCompactionDispatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompactionDirectivesdispatch(CompactionDispatcher.DispatchParameters params)Accumulo calls this method for compactions to determine what service to use.voidinit(CompactionDispatcher.InitParameters params)This method is called once after a CompactionDispatcher is instantiated.
-
-
-
Method Detail
-
init
public void init(CompactionDispatcher.InitParameters params)
Description copied from interface:CompactionDispatcherThis method is called once after a CompactionDispatcher is instantiated.- Specified by:
initin interfaceCompactionDispatcher
-
dispatch
public CompactionDirectives dispatch(CompactionDispatcher.DispatchParameters params)
Description copied from interface:CompactionDispatcherAccumulo calls this method for compactions to determine what service to use.- Specified by:
dispatchin interfaceCompactionDispatcher
-
-