Class HLLMetadata
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.stat.hll.serialization.HLLMetadata
-
- All Implemented Interfaces:
IHLLMetadata
public class HLLMetadata extends Object implements IHLLMetadata
A concreteIHLLMetadataimplemented as a simple struct.
-
-
Constructor Summary
Constructors Constructor Description HLLMetadata(int schemaVersion, HLLType type, int registerCountLog2, int registerWidth, int log2ExplicitCutoff, boolean explicitOff, boolean explicitAuto, boolean sparseEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexplicitAuto()booleanexplicitOff()HLLTypeHLLType()intlog2ExplicitCutoff()intregisterCountLog2()intregisterWidth()intschemaVersion()booleansparseEnabled()StringtoString()
-
-
-
Constructor Detail
-
HLLMetadata
public HLLMetadata(int schemaVersion, HLLType type, int registerCountLog2, int registerWidth, int log2ExplicitCutoff, boolean explicitOff, boolean explicitAuto, boolean sparseEnabled)- Parameters:
schemaVersion- the schema version number of the HLL. This must be greater than or equal to zero.type- thetypeof the HLL. This cannot benull.registerCountLog2- the log-base-2 register count parameter for probabilistic HLLs. This must be greater than or equal to zero.registerWidth- the register width parameter for probabilistic HLLs. This must be greater than or equal to zero.log2ExplicitCutoff- the log-base-2 of the explicit cardinality cutoff, if it is explicitly defined. (IfexplicitOfforexplicitAutoistruethen this has no meaning.)explicitOff- the flag for 'explicit off'-mode, where theHLLType.EXPLICITrepresentation is not used. Both this andexplicitAutocannot betrueat the same time.explicitAuto- the flag for 'explicit auto'-mode, where theHLLType.EXPLICITrepresentation's promotion cutoff is determined based on in-memory size automatically. Both this andexplicitOffcannot betrueat the same time.sparseEnabled- the flag for 'sparse-enabled'-mode, where theHLLType.SPARSErepresentation is used.
-
-
Method Detail
-
schemaVersion
public int schemaVersion()
- Specified by:
schemaVersionin interfaceIHLLMetadata- Returns:
- the schema version of the HLL. This will never be
null.
-
HLLType
public HLLType HLLType()
- Specified by:
HLLTypein interfaceIHLLMetadata- Returns:
- the type of the HLL. This will never be
null.
-
registerCountLog2
public int registerCountLog2()
- Specified by:
registerCountLog2in interfaceIHLLMetadata- Returns:
- the log-base-2 of the register count parameter of the HLL. This will always be greater than or equal to 4 and less than or equal to 31.
-
registerWidth
public int registerWidth()
- Specified by:
registerWidthin interfaceIHLLMetadata- Returns:
- the register width parameter of the HLL. This will always be greater than or equal to 1 and less than or equal to 8.
-
log2ExplicitCutoff
public int log2ExplicitCutoff()
- Specified by:
log2ExplicitCutoffin interfaceIHLLMetadata- Returns:
- the log-base-2 of the explicit cutoff cardinality. This will always be greater than or equal to zero and less than 31, per the specification.
-
explicitOff
public boolean explicitOff()
- Specified by:
explicitOffin interfaceIHLLMetadata- Returns:
trueif theHLLType.EXPLICITrepresentation has been disabled.falseotherwise.
-
explicitAuto
public boolean explicitAuto()
- Specified by:
explicitAutoin interfaceIHLLMetadata- Returns:
trueif theHLLType.EXPLICITrepresentation cutoff cardinality is set to be automatically chosen,falseotherwise.
-
sparseEnabled
public boolean sparseEnabled()
- Specified by:
sparseEnabledin interfaceIHLLMetadata- Returns:
trueif theHLLType.SPARSErepresentation is enabled.
-
-