public class DataGenerator extends Object
| Constructor and Description |
|---|
DataGenerator(List<GeneratorColumnSchema> columnSchemas,
long seed,
org.joda.time.Interval interval,
int numRows) |
DataGenerator(List<GeneratorColumnSchema> columnSchemas,
long seed,
long startTime,
int numConsecutiveTimestamps,
Double timestampIncrement) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addStreamToIndex(Stream<InputRow> stream,
IncrementalIndex index)
Add rows from any generator to an index.
|
void |
addToIndex(IncrementalIndex index,
int numOfRows)
Add rows from this generator to an index.
|
InputRow |
nextRow() |
DataGenerator |
reset(long seed)
Reset this generator to start from the begining of the interval with a new seed.
|
List<InputRow> |
toList(int numOfRows)
Put rows from this generator to a list.
|
public DataGenerator(List<GeneratorColumnSchema> columnSchemas, long seed, long startTime, int numConsecutiveTimestamps, Double timestampIncrement)
public DataGenerator(List<GeneratorColumnSchema> columnSchemas, long seed, org.joda.time.Interval interval, int numRows)
public InputRow nextRow()
public DataGenerator reset(long seed)
seed - the new seed to generate rows frompublic static void addStreamToIndex(Stream<InputRow> stream, IncrementalIndex index)
stream - the stream of rows to addindex - the index to add rows topublic void addToIndex(IncrementalIndex index, int numOfRows)
index - the index to add rows tonumOfRows - the number of rows to addCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.