Class MajorCompactionRequest
- java.lang.Object
-
- org.apache.accumulo.tserver.compaction.MajorCompactionRequest
-
- All Implemented Interfaces:
Cloneable
@Deprecated(since="2.1.0", forRemoval=true) public class MajorCompactionRequest extends Object implements Cloneable
Deprecated, for removal: This API element is subject to removal in a future version.Information that can be used to determine how a tablet is to be major compacted, if needed.
-
-
Constructor Summary
Constructors Constructor Description MajorCompactionRequest(KeyExtent extent, MajorCompactionReason reason, AccumuloConfiguration tabletConfig, ServerContext context)
Deprecated, for removal: This API element is subject to removal in a future version.MajorCompactionRequest(KeyExtent extent, MajorCompactionReason reason, VolumeManager manager, AccumuloConfiguration tabletConfig, BlockCache summaryCache, BlockCache indexCache, com.google.common.cache.Cache<String,Long> fileLenCache, ServerContext context)
Deprecated, for removal: This API element is subject to removal in a future version.MajorCompactionRequest(MajorCompactionRequest mcr)
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MajorCompactionRequest
clone()
Deprecated, for removal: This API element is subject to removal in a future version.Map<StoredTabletFile,DataFileValue>
getFiles()
Deprecated, for removal: This API element is subject to removal in a future version.int
getMaxFilesPerTablet()
Deprecated, for removal: This API element is subject to removal in a future version.MajorCompactionReason
getReason()
Deprecated, for removal: This API element is subject to removal in a future version.List<Summary>
getSummaries(Collection<StoredTabletFile> files, Predicate<SummarizerConfiguration> summarySelector)
Deprecated, for removal: This API element is subject to removal in a future version.Returns all summaries present in each file.String
getTableConfig(String key)
Deprecated, for removal: This API element is subject to removal in a future version.Map<String,String>
getTableProperties()
Deprecated, for removal: This API element is subject to removal in a future version.TabletId
getTabletId()
Deprecated, for removal: This API element is subject to removal in a future version.void
setFiles(Map<StoredTabletFile,DataFileValue> update)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
-
Constructor Detail
-
MajorCompactionRequest
public MajorCompactionRequest(KeyExtent extent, MajorCompactionReason reason, VolumeManager manager, AccumuloConfiguration tabletConfig, BlockCache summaryCache, BlockCache indexCache, com.google.common.cache.Cache<String,Long> fileLenCache, ServerContext context)
Deprecated, for removal: This API element is subject to removal in a future version.
-
MajorCompactionRequest
public MajorCompactionRequest(KeyExtent extent, MajorCompactionReason reason, AccumuloConfiguration tabletConfig, ServerContext context)
Deprecated, for removal: This API element is subject to removal in a future version.
-
MajorCompactionRequest
public MajorCompactionRequest(MajorCompactionRequest mcr)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Detail
-
getTabletId
public TabletId getTabletId()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getReason
public MajorCompactionReason getReason()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getFiles
public Map<StoredTabletFile,DataFileValue> getFiles()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getSummaries
public List<Summary> getSummaries(Collection<StoredTabletFile> files, Predicate<SummarizerConfiguration> summarySelector)
Deprecated, for removal: This API element is subject to removal in a future version.Returns all summaries present in each file.This method can only be called from
CompactionStrategy.gatherInformation(MajorCompactionRequest)
. Unfortunately,gatherInformation()
is not called beforeCompactionStrategy.shouldCompact(MajorCompactionRequest)
. ThereforeshouldCompact()
should just return true when a compactions strategy wants to use summary information.When using summaries to make compaction decisions, it's important to ensure that all summary data fits in the tablet server summary cache. The size of this cache is configured by code tserver.cache.summary.size}. Also it's important to use the summarySelector predicate to only retrieve the needed summary data. Otherwise unneeded summary data could be brought into the cache.
Some files may contain data outside of a tablets range. When
Summarizer
's generate small amounts of summary data, multiple summaries may be stored within a file for different row ranges. This will allow more accurate summaries to be returned for the case where a file has data outside a tablets range. However, some summary data outside of the tablets range may still be included. When this happensSummary.FileStatistics.getExtra()
will be non zero. Also, its good to be aware of the other potential causes of inaccuraciesSummary.FileStatistics.getInaccurate()
When this method is called with multiple files, it will automatically merge summary data using
Summarizer.Combiner.merge(Map, Map)
. If summary information is needed for each file, then just call this method for each file.Writing a compaction strategy that uses summary information is a bit tricky. See the source code for
TooManyDeletesCompactionStrategy
as an example of a compaction strategy.
-
setFiles
public void setFiles(Map<StoredTabletFile,DataFileValue> update)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getTableProperties
public Map<String,String> getTableProperties()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getTableConfig
public String getTableConfig(String key)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getMaxFilesPerTablet
public int getMaxFilesPerTablet()
Deprecated, for removal: This API element is subject to removal in a future version.
-
clone
public MajorCompactionRequest clone() throws CloneNotSupportedException
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
-