Class DataGenerator
java.lang.Object
org.apache.druid.segment.generator.DataGenerator
-
Constructor Summary
ConstructorsConstructorDescriptionDataGenerator(List<GeneratorColumnSchema> columnSchemas, long seed, long startTime, int numConsecutiveTimestamps, Double timestampIncrement) DataGenerator(List<GeneratorColumnSchema> columnSchemas, long seed, org.joda.time.Interval interval, int numRows) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddStreamToIndex(Stream<InputRow> stream, IncrementalIndex index) Add rows from any generator to an index.voidaddToIndex(IncrementalIndex index, int numOfRows) Add rows from this generator to an index.nextRaw()nextRow()reset(long seed) Reset this generator to start from the begining of the interval with a new seed.toList(int numOfRows) Put rows from this generator to a list.
-
Constructor Details
-
DataGenerator
public DataGenerator(List<GeneratorColumnSchema> columnSchemas, long seed, long startTime, int numConsecutiveTimestamps, Double timestampIncrement) -
DataGenerator
public DataGenerator(List<GeneratorColumnSchema> columnSchemas, long seed, org.joda.time.Interval interval, int numRows)
-
-
Method Details
-
nextRow
-
nextRaw
-
nextRaw
-
reset
Reset this generator to start from the begining of the interval with a new seed.- Parameters:
seed- the new seed to generate rows from
-
addStreamToIndex
Add rows from any generator to an index.- Parameters:
stream- the stream of rows to addindex- the index to add rows to
-
addToIndex
Add rows from this generator to an index.- Parameters:
index- the index to add rows tonumOfRows- the number of rows to add
-
toList
Put rows from this generator to a list.- Parameters:
numOfRows- the number of rows to put in the list- Returns:
- a List of InputRow
-