public class FactCodec extends Object
| Constructor and Description |
|---|
FactCodec(EntityTable entityTable,
int resolution,
int rollTimebaseInterval) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
createColumn(long ts) |
byte[] |
createEndRowKey(List<co.cask.cdap.api.dataset.lib.cube.DimensionValue> dimensionValues,
String measureName,
long ts,
boolean anyAggGroup)
Builds end row key for scan operation.
|
byte[] |
createFuzzyRowMask(List<co.cask.cdap.api.dataset.lib.cube.DimensionValue> dimensionValues,
String measureName) |
byte[] |
createRowKey(List<co.cask.cdap.api.dataset.lib.cube.DimensionValue> dimensionValues,
String measureName,
long ts)
Builds row key for write and get operations.
|
byte[] |
createStartRowKey(List<co.cask.cdap.api.dataset.lib.cube.DimensionValue> dimensionValues,
String measureName,
long ts,
boolean anyAggGroup)
Builds start row key for scan operation.
|
List<co.cask.cdap.api.dataset.lib.cube.DimensionValue> |
getDimensionValues(byte[] rowKey) |
String |
getMeasureName(byte[] rowKey) |
byte[] |
getNextRowKey(byte[] rowKey,
int indexOfDimValueToChange)
For the given rowKey, return next rowKey that has different dimensionValue at given position.
|
long |
getTimestamp(byte[] rowKey,
byte[] column) |
public FactCodec(EntityTable entityTable, int resolution, int rollTimebaseInterval)
public byte[] createRowKey(List<co.cask.cdap.api.dataset.lib.cube.DimensionValue> dimensionValues, String measureName, long ts)
dimensionValues - dimension valuesmeasureName - measure namets - timestamppublic byte[] createStartRowKey(List<co.cask.cdap.api.dataset.lib.cube.DimensionValue> dimensionValues, String measureName, long ts, boolean anyAggGroup)
dimensionValues - dimension valuesmeasureName - measure namets - timestampanyAggGroup - if true, then scan matches every aggregation group; if false,
scan matches only aggregation group defined with list of dimension valuespublic byte[] createEndRowKey(List<co.cask.cdap.api.dataset.lib.cube.DimensionValue> dimensionValues, String measureName, long ts, boolean anyAggGroup)
dimensionValues - dimension valuesmeasureName - measure namets - timestampanyAggGroup - if true, then scan matches every aggregation group; if false,
scan matches only aggregation group defined with list of dimension valuespublic byte[] getNextRowKey(byte[] rowKey,
int indexOfDimValueToChange)
rowKey - given row keyindexOfDimValueToChange - position of the dimension in a given row key to changepublic byte[] createFuzzyRowMask(List<co.cask.cdap.api.dataset.lib.cube.DimensionValue> dimensionValues, String measureName)
public byte[] createColumn(long ts)
public String getMeasureName(byte[] rowKey)
public List<co.cask.cdap.api.dataset.lib.cube.DimensionValue> getDimensionValues(byte[] rowKey)
public long getTimestamp(byte[] rowKey,
byte[] column)
Copyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.