public class SegmentHeader extends Object implements Serializable
The segment header objects are immutable and fully serializable.
The headers have each an ID which is a SHA-256 checksum of the
following properties, concatenated. See
getUniqueID()
String.valueof([value object])
Modifier and Type | Field and Description |
---|---|
List<String> |
compoundPredicates |
BitKey |
constrainedColsBitKey |
String |
cubeName |
String |
measureName |
String |
rolapStarFactTableName |
ByteString |
schemaChecksum |
String |
schemaName |
Constructor and Description |
---|
SegmentHeader(String schemaName,
ByteString schemaChecksum,
String cubeName,
String measureName,
List<SegmentColumn> constrainedColumns,
List<String> compoundPredicates,
String rolapStarFactTableName,
BitKey constrainedColsBitKey,
List<SegmentColumn> excludedRegions)
Creates a segment header.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canConstrain(SegmentColumn[] region)
Checks if this header can be constrained by a given region.
|
SegmentHeader |
clone(SegmentColumn[] overrideValues)
Creates a clone of this header by replacing some of the
constrained columns in the process.
|
SegmentHeader |
constrain(SegmentColumn[] region)
Applies a set of exclusions to this segment header and returns
a new segment header representing the original one to which a
region has been excluded.
|
boolean |
equals(Object obj) |
int |
getArity()
Returns the arity of this SegmentHeader.
|
SegmentColumn |
getConstrainedColumn(String columnExpression)
Returns the constrained column object, if any, corresponding
to a column name and a table name.
|
List<SegmentColumn> |
getConstrainedColumns()
Returns a list of constrained columns which define this segment
header.
|
BitKey |
getConstrainedColumnsBitKey() |
String |
getDescription()
Returns a human readable description of this
segment header.
|
SegmentColumn |
getExcludedRegion(String columnExpression) |
List<SegmentColumn> |
getExcludedRegions() |
ByteString |
getUniqueID()
Returns a unique identifier for this header.
|
int |
hashCode() |
String |
toString() |
public final String measureName
public final String cubeName
public final String schemaName
public final String rolapStarFactTableName
public final BitKey constrainedColsBitKey
public final ByteString schemaChecksum
public SegmentHeader(String schemaName, ByteString schemaChecksum, String cubeName, String measureName, List<SegmentColumn> constrainedColumns, List<String> compoundPredicates, String rolapStarFactTableName, BitKey constrainedColsBitKey, List<SegmentColumn> excludedRegions)
schemaName
- The name of the schema which this
header belongs to.schemaChecksum
- Schema checksumcubeName
- The name of the cube this segment belongs to.measureName
- The name of the measure which defines
this header.constrainedColumns
- An array of constrained columns
objects which define the predicated of this segment header.compoundPredicates
- Compound predicates (Must not be null, but
typically empty.)rolapStarFactTableName
- Star fact table nameconstrainedColsBitKey
- Constrained columns bit keyexcludedRegions
- Excluded regions. (Must not be null, but typicallypublic SegmentHeader clone(SegmentColumn[] overrideValues)
overrideValues
- A list of constrained columns to either
replace or add to the original header.public boolean canConstrain(SegmentColumn[] region)
It will return false if the region covers one of the axis in its entirety.
It will return false if the region sits outside of the bounds of this header. This means that when performing a flush operation, the header must be scrapped altogether.
public SegmentHeader constrain(SegmentColumn[] region)
region
- Regionpublic int getArity()
public List<SegmentColumn> getExcludedRegions()
public List<SegmentColumn> getConstrainedColumns()
public SegmentColumn getConstrainedColumn(String columnExpression)
columnExpression
- The column name we want.public SegmentColumn getExcludedRegion(String columnExpression)
public BitKey getConstrainedColumnsBitKey()
public ByteString getUniqueID()
public String getDescription()
Copyright © 2018 Hitachi Vantara. All rights reserved.