Class CompactionConfig

java.lang.Object
org.apache.accumulo.core.client.admin.CompactionConfig

public class CompactionConfig extends Object
This class exist to pass parameters to TableOperations.compact(String, CompactionConfig)
Since:
1.7.0
  • Constructor Details

    • CompactionConfig

      public CompactionConfig()
  • Method Details

    • setStartRow

      public CompactionConfig setStartRow(org.apache.hadoop.io.Text start)
      Parameters:
      start - First tablet to be compacted contains the row after this row, null means the first tablet in table. The default is null.
      Returns:
      this
    • getStartRow

      public org.apache.hadoop.io.Text getStartRow()
      Returns:
      The previously set start row. The default is null.
    • setEndRow

      public CompactionConfig setEndRow(org.apache.hadoop.io.Text end)
      Parameters:
      end - Last tablet to be compacted contains this row, null means the last tablet in table. The default is null.
      Returns:
      this
    • getEndRow

      public org.apache.hadoop.io.Text getEndRow()
      Returns:
      The previously set end row. The default is null.
    • setFlush

      public CompactionConfig setFlush(boolean flush)
      Parameters:
      flush - If set to true, will flush in memory data of all tablets in range before compacting. If not set, the default is true.
      Returns:
      this
    • getFlush

      public boolean getFlush()
      Returns:
      The previously set flush. The default is true.
    • setWait

      public CompactionConfig setWait(boolean wait)
      Parameters:
      wait - If set to true, will cause compact operation to wait for all tablets in range to compact. If not set, the default is true.
      Returns:
      this
    • getWait

      public boolean getWait()
      Returns:
      The previously set wait. The default is true.
    • setIterators

      public CompactionConfig setIterators(List<IteratorSetting> iterators)
      Parameters:
      iterators - configures the iterators that will be used when compacting tablets. These iterators are merged with current iterators configured for the table.
      Returns:
      this
    • getIterators

      public List<IteratorSetting> getIterators()
      Returns:
      The previously set iterators. Returns an empty list if not set. The returned list is unmodifiable.
    • setCompactionStrategy

      @Deprecated(since="2.1.0", forRemoval=true) public CompactionConfig setCompactionStrategy(CompactionStrategyConfig csConfig)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 2.1.0 use setSelector(PluginConfig) and setConfigurer(PluginConfig) instead. See CompactionStrategyConfig for details about why this was deprecated.
      Parameters:
      csConfig - configures the strategy that will be used by each tablet to select files. If no strategy is set, then all files will be compacted.
      Returns:
      this
    • getCompactionStrategy

      @Deprecated(since="2.1.0", forRemoval=true) public CompactionStrategyConfig getCompactionStrategy()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 2.1.0
      Returns:
      The previously set compaction strategy. Defaults to a configuration of org.apache.accumulo.tserver.compaction.EverythingCompactionStrategy which always compacts all files.
    • setSelector

      public CompactionConfig setSelector(PluginConfig selectorConfig)
      Configure a CompactionSelector plugin to run for this compaction. Specify the class name and options here.
      Returns:
      this;
      Since:
      2.1.0
    • getSelector

      public PluginConfig getSelector()
      Since:
      2.1.0
    • setExecutionHints

      public CompactionConfig setExecutionHints(Map<String,String> hints)
      Since:
      2.1.0
    • getExecutionHints

      public Map<String,String> getExecutionHints()
      Since:
      2.1.0
    • setConfigurer

      public CompactionConfig setConfigurer(PluginConfig configurerConfig)
      Enables a CompactionConfigurer to run for this compaction on the server side. Specify the class name and options here.
      Since:
      2.1.0
    • getConfigurer

      public PluginConfig getConfigurer()
      Since:
      2.1.0
    • toString

      public String toString()
      Overrides:
      toString in class Object