Class CubeGenerator
- java.lang.Object
-
- com.twilio.kudu.dataloader.generator.ColumnValueGenerator
-
- com.twilio.kudu.dataloader.generator.MultipleColumnValueGenerator
-
- com.twilio.kudu.dataloader.generator.CubeGenerator
-
public class CubeGenerator extends MultipleColumnValueGenerator
Generate rows using the row counts of a cube grouped by its primary keys. This is useful to generate data of a non-uniform distribution so that the rollup of fact rows in a cube can be modelled.
-
-
Field Summary
Fields Modifier and Type Field Description String
groupedColumnCountsResource
List<String>
groupedColumns
int
numUniqueGroups
-
Constructor Summary
Constructors Constructor Description CubeGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getColumnNames()
Object
getColumnValue(String columnName)
void
initialize()
Initialize theColumnValueGenerator
from JSON or other files.void
reset()
Reset the state so that column values for a new row can be generatedvoid
setColumnNameToValueGenerator(Map<String,SingleColumnValueGenerator> columnNameToValueGenerator)
-
-
-
Method Detail
-
getColumnNames
public List<String> getColumnNames()
- Specified by:
getColumnNames
in classMultipleColumnValueGenerator
-
reset
public void reset()
Description copied from class:MultipleColumnValueGenerator
Reset the state so that column values for a new row can be generated- Specified by:
reset
in classMultipleColumnValueGenerator
-
getColumnValue
public Object getColumnValue(String columnName)
- Specified by:
getColumnValue
in classColumnValueGenerator
-
initialize
public void initialize()
Description copied from class:ColumnValueGenerator
Initialize theColumnValueGenerator
from JSON or other files. Used as a alternative constructor- Specified by:
initialize
in classColumnValueGenerator
-
setColumnNameToValueGenerator
public void setColumnNameToValueGenerator(Map<String,SingleColumnValueGenerator> columnNameToValueGenerator)
-
-