Search in sources :

Example 1 with SortedIntegerFieldValueGenerator

use of org.apache.hyracks.storage.am.common.datagen.SortedIntegerFieldValueGenerator 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)

Example 2 with SortedIntegerFieldValueGenerator

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

the class LSMInvertedIndexTestUtils method createPersonNamesTupleGen.

public static TupleGenerator createPersonNamesTupleGen(Random rnd) throws IOException {
    IFieldValueGenerator[] fieldGens = new IFieldValueGenerator[2];
    fieldGens[0] = new PersonNameFieldValueGenerator(rnd, 0.5f);
    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) PersonNameFieldValueGenerator(org.apache.hyracks.storage.am.common.datagen.PersonNameFieldValueGenerator) 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) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer)

Aggregations

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