public class CompressionSettingsBuilder extends Object
Constructor and Description |
---|
CompressionSettingsBuilder() |
Modifier and Type | Method and Description |
---|---|
CompressionSettingsBuilder |
addValidCompression(AColGroup.CompressionType cp)
Add a single valid compression type to the EnumSet of valid compressions.
|
CompressionSettingsBuilder |
clearValidCompression()
Clear all the compression types allowed in the compression.
|
CompressionSettingsBuilder |
copySettings(CompressionSettings that)
Copy the settings from another CompressionSettings Builder, modifies this, not that.
|
CompressionSettings |
create()
Create the CompressionSettings object to use in the compression.
|
CompressionSettingsBuilder |
setAllowSharedDictionary(boolean allowSharedDictionary)
Allow the Dictionaries to be shared between different column groups.
|
CompressionSettingsBuilder |
setCoCodePercentage(double coCodePercentage)
Set the coCode percentage, the effect is different based on the coCoding strategy, but the general effect is that
higher values results in more coCoding while lower values result in less.
|
CompressionSettingsBuilder |
setColumnPartitioner(CoCoderFactory.PartitionerType columnPartitioner)
Set the type of CoCoding Partitioner type to use for combining columns together.
|
CompressionSettingsBuilder |
setCostType(CostEstimatorFactory.CostType costType)
Set the cost type used for estimating the cost of column groups default is memory based.
|
CompressionSettingsBuilder |
setEstimationType(SampleEstimatorFactory.EstimationType estimationType)
Set the estimation type used for the sampled estimates.
|
CompressionSettingsBuilder |
setIsInSparkInstruction()
Inform the compression that it is executed in a spark instruction.
|
CompressionSettingsBuilder |
setLossy(boolean lossy)
Set the Compression to use Lossy compression.
|
CompressionSettingsBuilder |
setMaxColGroupCoCode(int maxColGroupCoCode)
Set the maximum number of columns to CoCode together in the CoCoding strategy.
|
CompressionSettingsBuilder |
setMaxSampleSize(int maxSampleSize)
Set the maximum sample size to extract from a given matrix, this overrules the sample percentage if the sample
percentage extracted is higher than this maximum bound.
|
CompressionSettingsBuilder |
setMinimumCompressionRatio(double ratio)
Set the minimum compression ratio to be achieved by the compression.
|
CompressionSettingsBuilder |
setMinimumSampleSize(int minimumSampleSize)
Set the minimum sample size to extract from a given matrix, this overrules the sample percentage if the sample
percentage extracted is lower than this minimum bound.
|
CompressionSettingsBuilder |
setSamplingRatio(double samplingRatio)
Set the sampling ratio in percent to sample the input matrix.
|
CompressionSettingsBuilder |
setSeed(int seed)
Set the seed for the compression operation.
|
CompressionSettingsBuilder |
setSortValuesByLength(boolean sortValuesByLength)
Set the sortValuesByLength flag.
|
CompressionSettingsBuilder |
setTransposeInput(String transposeInput)
Specify if the input matrix should be transposed before compression.
|
CompressionSettingsBuilder |
setValidCompressions(EnumSet<AColGroup.CompressionType> validCompressions)
Set the valid compression strategies used for the compression.
|
public CompressionSettingsBuilder copySettings(CompressionSettings that)
that
- The other CompressionSettingsBuilder to copy settings from.public CompressionSettingsBuilder setLossy(boolean lossy)
lossy
- A boolean specifying if the compression should be lossypublic CompressionSettingsBuilder setSamplingRatio(double samplingRatio)
samplingRatio
- The ratio to sample from the inputpublic CompressionSettingsBuilder setSortValuesByLength(boolean sortValuesByLength)
sortValuesByLength
- A boolean specifying if the values should be sortedpublic CompressionSettingsBuilder setAllowSharedDictionary(boolean allowSharedDictionary)
allowSharedDictionary
- A boolean specifying if the dictionary can be shared between column groups.public CompressionSettingsBuilder setTransposeInput(String transposeInput)
transposeInput
- string specifying if the input should be transposed before compression, should be one of
"auto", "true" or "false"public CompressionSettingsBuilder setSeed(int seed)
seed
- The seed used in sampling the matrix and general operations in the compression.public CompressionSettingsBuilder setValidCompressions(EnumSet<AColGroup.CompressionType> validCompressions)
validCompressions
- An EnumSet of CompressionTypes to use in the compressionpublic CompressionSettingsBuilder addValidCompression(AColGroup.CompressionType cp)
cp
- The compression type to add to the valid ones.public CompressionSettingsBuilder clearValidCompression()
public CompressionSettingsBuilder setColumnPartitioner(CoCoderFactory.PartitionerType columnPartitioner)
columnPartitioner
- The Strategy to select from PartitionerTypepublic CompressionSettingsBuilder setMaxColGroupCoCode(int maxColGroupCoCode)
maxColGroupCoCode
- The max selected.public CompressionSettingsBuilder setCoCodePercentage(double coCodePercentage)
coCodePercentage
- The percentage to set.public CompressionSettingsBuilder setMinimumSampleSize(int minimumSampleSize)
minimumSampleSize
- The minimum sample size to extractpublic CompressionSettingsBuilder setMaxSampleSize(int maxSampleSize)
maxSampleSize
- The maximum sample size to extractpublic CompressionSettingsBuilder setEstimationType(SampleEstimatorFactory.EstimationType estimationType)
estimationType
- the estimation type in used.public CompressionSettingsBuilder setCostType(CostEstimatorFactory.CostType costType)
costType
- The Cost type wantedpublic CompressionSettingsBuilder setMinimumCompressionRatio(double ratio)
ratio
- The ratio to achieve while compressingpublic CompressionSettingsBuilder setIsInSparkInstruction()
public CompressionSettings create()
Copyright © 2021 The Apache Software Foundation. All rights reserved.