Search in sources :

Example 1 with DocumentStringFieldValueGenerator

use of org.apache.hyracks.storage.am.common.datagen.DocumentStringFieldValueGenerator in project asterixdb by apache.

the class LSMInvertedIndexTestUtils method createStringDocumentTupleGen.

public static TupleGenerator createStringDocumentTupleGen(Random rnd) throws IOException {
    IFieldValueGenerator[] fieldGens = new IFieldValueGenerator[2];
    fieldGens[0] = new DocumentStringFieldValueGenerator(2, 10, 10000, rnd);
    fieldGens[1] = new SortedIntegerFieldValueGenerator(0);
    ISerializerDeserializer[] fieldSerdes = new ISerializerDeserializer[] { new UTF8StringSerializerDeserializer(), IntegerSerializerDeserializer.INSTANCE };
    TupleGenerator tupleGen = new TupleGenerator(fieldGens, fieldSerdes, 0);
    return tupleGen;
}
Also used : SortedIntegerFieldValueGenerator(org.apache.hyracks.storage.am.common.datagen.SortedIntegerFieldValueGenerator) IFieldValueGenerator(org.apache.hyracks.storage.am.common.datagen.IFieldValueGenerator) TupleGenerator(org.apache.hyracks.storage.am.common.datagen.TupleGenerator) UTF8StringSerializerDeserializer(org.apache.hyracks.dataflow.common.data.marshalling.UTF8StringSerializerDeserializer) DocumentStringFieldValueGenerator(org.apache.hyracks.storage.am.common.datagen.DocumentStringFieldValueGenerator) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer)

Aggregations

ISerializerDeserializer (org.apache.hyracks.api.dataflow.value.ISerializerDeserializer)1 UTF8StringSerializerDeserializer (org.apache.hyracks.dataflow.common.data.marshalling.UTF8StringSerializerDeserializer)1 DocumentStringFieldValueGenerator (org.apache.hyracks.storage.am.common.datagen.DocumentStringFieldValueGenerator)1 IFieldValueGenerator (org.apache.hyracks.storage.am.common.datagen.IFieldValueGenerator)1 SortedIntegerFieldValueGenerator (org.apache.hyracks.storage.am.common.datagen.SortedIntegerFieldValueGenerator)1 TupleGenerator (org.apache.hyracks.storage.am.common.datagen.TupleGenerator)1