Search in sources :

Example 11 with TestWorkloadConf

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

the class LSMInvertedIndexMultiThreadTest method wordTokensInvIndexTest.

@Test
public void wordTokensInvIndexTest() throws IOException, InterruptedException {
    String dataMsg = "Documents";
    int[] numThreads = new int[] { REGULAR_NUM_THREADS, EXCESSIVE_NUM_THREADS };
    for (int i = 0; i < numThreads.length; i++) {
        for (TestWorkloadConf conf : workloadConfs) {
            setUp();
            LSMInvertedIndexTestContext testCtx = LSMInvertedIndexTestUtils.createWordInvIndexTestContext(harness, getIndexType());
            TupleGenerator tupleGen = LSMInvertedIndexTestUtils.createStringDocumentTupleGen(harness.getRandom());
            runTest(testCtx, tupleGen, numThreads[i], conf, dataMsg);
            tearDown();
        }
    }
}
Also used : TestWorkloadConf(org.apache.hyracks.storage.am.common.TestWorkloadConf) LSMInvertedIndexTestContext(org.apache.hyracks.storage.am.lsm.invertedindex.util.LSMInvertedIndexTestContext) TupleGenerator(org.apache.hyracks.storage.am.common.datagen.TupleGenerator) Test(org.junit.Test)

Example 12 with TestWorkloadConf

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

the class LSMInvertedIndexMultiThreadTest method hashedNGramTokensInvIndexTest.

@Test
public void hashedNGramTokensInvIndexTest() throws IOException, InterruptedException {
    String dataMsg = "Person Names";
    int[] numThreads = new int[] { REGULAR_NUM_THREADS, EXCESSIVE_NUM_THREADS };
    for (int i = 0; i < numThreads.length; i++) {
        for (TestWorkloadConf conf : workloadConfs) {
            setUp();
            LSMInvertedIndexTestContext testCtx = LSMInvertedIndexTestUtils.createHashedNGramInvIndexTestContext(harness, getIndexType());
            TupleGenerator tupleGen = LSMInvertedIndexTestUtils.createPersonNamesTupleGen(harness.getRandom());
            runTest(testCtx, tupleGen, numThreads[i], conf, dataMsg);
            tearDown();
        }
    }
}
Also used : TestWorkloadConf(org.apache.hyracks.storage.am.common.TestWorkloadConf) LSMInvertedIndexTestContext(org.apache.hyracks.storage.am.lsm.invertedindex.util.LSMInvertedIndexTestContext) TupleGenerator(org.apache.hyracks.storage.am.common.datagen.TupleGenerator) Test(org.junit.Test)

Example 13 with TestWorkloadConf

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

the class AbstractRTreeMultiThreadTest method rstartreeTwoDimensionsInt.

@Test
public void rstartreeTwoDimensionsInt() throws InterruptedException, HyracksDataException {
    if (!testRstarPolicy) {
        if (LOGGER.isLoggable(Level.INFO)) {
            LOGGER.info("Ignoring RTree Multithread Test With Two Dimensions With Integer Keys.");
        }
        return;
    }
    ISerializerDeserializer[] fieldSerdes = { IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE };
    int numKeys = 4;
    IPrimitiveValueProviderFactory[] valueProviderFactories = RTreeUtils.createPrimitiveValueProviderFactories(numKeys, IntegerPointable.FACTORY);
    String dataMsg = "Two Dimensions Of Integer Values";
    for (TestWorkloadConf conf : workloadConfs) {
        runTest(fieldSerdes, valueProviderFactories, numKeys, RTreePolicyType.RSTARTREE, REGULAR_NUM_THREADS, conf, dataMsg);
        runTest(fieldSerdes, valueProviderFactories, numKeys, RTreePolicyType.RSTARTREE, EXCESSIVE_NUM_THREADS, conf, dataMsg);
    }
}
Also used : TestWorkloadConf(org.apache.hyracks.storage.am.common.TestWorkloadConf) IPrimitiveValueProviderFactory(org.apache.hyracks.storage.am.common.api.IPrimitiveValueProviderFactory) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer) Test(org.junit.Test)

Example 14 with TestWorkloadConf

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

the class AbstractRTreeMultiThreadTest method rtreeFourDimensionsDouble.

@Test
public void rtreeFourDimensionsDouble() throws InterruptedException, HyracksDataException {
    ISerializerDeserializer[] fieldSerdes = { DoubleSerializerDeserializer.INSTANCE, DoubleSerializerDeserializer.INSTANCE, DoubleSerializerDeserializer.INSTANCE, DoubleSerializerDeserializer.INSTANCE, DoubleSerializerDeserializer.INSTANCE, DoubleSerializerDeserializer.INSTANCE, DoubleSerializerDeserializer.INSTANCE, DoubleSerializerDeserializer.INSTANCE, DoubleSerializerDeserializer.INSTANCE };
    int numKeys = 8;
    IPrimitiveValueProviderFactory[] valueProviderFactories = RTreeUtils.createPrimitiveValueProviderFactories(numKeys, DoublePointable.FACTORY);
    String dataMsg = "Four Dimensions Of Double Values";
    for (TestWorkloadConf conf : workloadConfs) {
        runTest(fieldSerdes, valueProviderFactories, numKeys, RTreePolicyType.RTREE, REGULAR_NUM_THREADS, conf, dataMsg);
        runTest(fieldSerdes, valueProviderFactories, numKeys, RTreePolicyType.RTREE, EXCESSIVE_NUM_THREADS, conf, dataMsg);
    }
}
Also used : TestWorkloadConf(org.apache.hyracks.storage.am.common.TestWorkloadConf) IPrimitiveValueProviderFactory(org.apache.hyracks.storage.am.common.api.IPrimitiveValueProviderFactory) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer) Test(org.junit.Test)

Example 15 with TestWorkloadConf

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

the class AbstractRTreeMultiThreadTest method rtreeTwoDimensionsInt.

@Test
public void rtreeTwoDimensionsInt() throws InterruptedException, HyracksDataException {
    ISerializerDeserializer[] fieldSerdes = { IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE };
    int numKeys = 4;
    IPrimitiveValueProviderFactory[] valueProviderFactories = RTreeUtils.createPrimitiveValueProviderFactories(numKeys, IntegerPointable.FACTORY);
    String dataMsg = "Two Dimensions Of Integer Values";
    for (TestWorkloadConf conf : workloadConfs) {
        runTest(fieldSerdes, valueProviderFactories, numKeys, RTreePolicyType.RTREE, REGULAR_NUM_THREADS, conf, dataMsg);
        runTest(fieldSerdes, valueProviderFactories, numKeys, RTreePolicyType.RTREE, EXCESSIVE_NUM_THREADS, conf, dataMsg);
    }
}
Also used : TestWorkloadConf(org.apache.hyracks.storage.am.common.TestWorkloadConf) IPrimitiveValueProviderFactory(org.apache.hyracks.storage.am.common.api.IPrimitiveValueProviderFactory) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer) Test(org.junit.Test)

Aggregations

TestWorkloadConf (org.apache.hyracks.storage.am.common.TestWorkloadConf)16 Test (org.junit.Test)10 ISerializerDeserializer (org.apache.hyracks.api.dataflow.value.ISerializerDeserializer)8 ArrayList (java.util.ArrayList)6 TestOperation (org.apache.hyracks.storage.am.common.TestOperationSelector.TestOperation)6 IPrimitiveValueProviderFactory (org.apache.hyracks.storage.am.common.api.IPrimitiveValueProviderFactory)6 TupleGenerator (org.apache.hyracks.storage.am.common.datagen.TupleGenerator)2 LSMInvertedIndexTestContext (org.apache.hyracks.storage.am.lsm.invertedindex.util.LSMInvertedIndexTestContext)2 UTF8StringSerializerDeserializer (org.apache.hyracks.dataflow.common.data.marshalling.UTF8StringSerializerDeserializer)1