Search in sources :

Example 6 with TestWorkloadConf

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

the class OrderedIndexMultiThreadTest method oneStringKeyAndValue.

@Test
public void oneStringKeyAndValue() throws InterruptedException, HyracksDataException {
    ISerializerDeserializer[] fieldSerdes = new ISerializerDeserializer[] { new UTF8StringSerializerDeserializer(), new UTF8StringSerializerDeserializer() };
    int numKeys = 1;
    String dataMsg = "One String Key And Value";
    for (TestWorkloadConf conf : workloadConfs) {
        runTest(fieldSerdes, numKeys, REGULAR_NUM_THREADS, conf, dataMsg);
        runTest(fieldSerdes, numKeys, EXCESSIVE_NUM_THREADS, conf, dataMsg);
    }
}
Also used : TestWorkloadConf(org.apache.hyracks.storage.am.common.TestWorkloadConf) UTF8StringSerializerDeserializer(org.apache.hyracks.dataflow.common.data.marshalling.UTF8StringSerializerDeserializer) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer) Test(org.junit.Test)

Example 7 with TestWorkloadConf

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

the class OrderedIndexMultiThreadTest method oneIntKeyAndValue.

@Test
public void oneIntKeyAndValue() throws InterruptedException, HyracksDataException {
    ISerializerDeserializer[] fieldSerdes = new ISerializerDeserializer[] { IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE };
    int numKeys = 1;
    String dataMsg = "One Int Key And Value";
    for (TestWorkloadConf conf : workloadConfs) {
        runTest(fieldSerdes, numKeys, REGULAR_NUM_THREADS, conf, dataMsg);
        runTest(fieldSerdes, numKeys, EXCESSIVE_NUM_THREADS, conf, dataMsg);
    }
}
Also used : TestWorkloadConf(org.apache.hyracks.storage.am.common.TestWorkloadConf) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer) Test(org.junit.Test)

Example 8 with TestWorkloadConf

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

the class RTreeMultiThreadTest method getTestWorkloadConf.

@Override
protected ArrayList<TestWorkloadConf> getTestWorkloadConf() {
    ArrayList<TestWorkloadConf> workloadConfs = new ArrayList<>();
    // Insert only workload.
    TestOperation[] insertOnlyOps = new TestOperation[] { TestOperation.INSERT };
    workloadConfs.add(new TestWorkloadConf(insertOnlyOps, ProbabilityHelper.getUniformProbDist(insertOnlyOps.length)));
    // Inserts mixed with scans.
    TestOperation[] insertSearchOnlyOps = new TestOperation[] { TestOperation.INSERT, TestOperation.SCAN, TestOperation.DISKORDER_SCAN };
    workloadConfs.add(new TestWorkloadConf(insertSearchOnlyOps, ProbabilityHelper.getUniformProbDist(insertSearchOnlyOps.length)));
    // Inserts and deletes.
    TestOperation[] insertDeleteOps = new TestOperation[] { TestOperation.INSERT, TestOperation.DELETE };
    workloadConfs.add(new TestWorkloadConf(insertDeleteOps, ProbabilityHelper.getUniformProbDist(insertDeleteOps.length)));
    // All operations mixed.
    TestOperation[] allOps = new TestOperation[] { TestOperation.INSERT, TestOperation.DELETE, TestOperation.SCAN, TestOperation.DISKORDER_SCAN };
    workloadConfs.add(new TestWorkloadConf(allOps, ProbabilityHelper.getUniformProbDist(allOps.length)));
    return workloadConfs;
}
Also used : TestOperation(org.apache.hyracks.storage.am.common.TestOperationSelector.TestOperation) TestWorkloadConf(org.apache.hyracks.storage.am.common.TestWorkloadConf) ArrayList(java.util.ArrayList)

Example 9 with TestWorkloadConf

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

the class BTreeMultiThreadTest method getTestWorkloadConf.

@Override
protected ArrayList<TestWorkloadConf> getTestWorkloadConf() {
    ArrayList<TestWorkloadConf> workloadConfs = new ArrayList<>();
    // Insert only workload.
    TestOperation[] insertOnlyOps = new TestOperation[] { TestOperation.INSERT };
    workloadConfs.add(new TestWorkloadConf(insertOnlyOps, ProbabilityHelper.getUniformProbDist(insertOnlyOps.length)));
    // Inserts mixed with point searches and scans.
    TestOperation[] insertSearchOnlyOps = new TestOperation[] { TestOperation.INSERT, TestOperation.POINT_SEARCH, TestOperation.SCAN, TestOperation.DISKORDER_SCAN };
    workloadConfs.add(new TestWorkloadConf(insertSearchOnlyOps, ProbabilityHelper.getUniformProbDist(insertSearchOnlyOps.length)));
    // Inserts, updates, deletes, and upserts.
    TestOperation[] insertDeleteUpdateUpsertOps = new TestOperation[] { TestOperation.INSERT, TestOperation.DELETE, TestOperation.UPDATE, TestOperation.UPSERT };
    workloadConfs.add(new TestWorkloadConf(insertDeleteUpdateUpsertOps, ProbabilityHelper.getUniformProbDist(insertDeleteUpdateUpsertOps.length)));
    // All operations mixed.
    TestOperation[] allOps = new TestOperation[] { TestOperation.INSERT, TestOperation.DELETE, TestOperation.UPDATE, TestOperation.UPSERT, TestOperation.POINT_SEARCH, TestOperation.SCAN, TestOperation.DISKORDER_SCAN };
    workloadConfs.add(new TestWorkloadConf(allOps, ProbabilityHelper.getUniformProbDist(allOps.length)));
    return workloadConfs;
}
Also used : TestOperation(org.apache.hyracks.storage.am.common.TestOperationSelector.TestOperation) TestWorkloadConf(org.apache.hyracks.storage.am.common.TestWorkloadConf) ArrayList(java.util.ArrayList)

Example 10 with TestWorkloadConf

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

the class LSMBTreeMultiThreadTest method getTestWorkloadConf.

@Override
protected ArrayList<TestWorkloadConf> getTestWorkloadConf() {
    ArrayList<TestWorkloadConf> workloadConfs = new ArrayList<>();
    // Insert only workload.
    TestOperation[] insertOnlyOps = new TestOperation[] { TestOperation.INSERT };
    workloadConfs.add(new TestWorkloadConf(insertOnlyOps, ProbabilityHelper.getUniformProbDist(insertOnlyOps.length)));
    // Insert and merge workload.
    TestOperation[] insertMergeOps = new TestOperation[] { TestOperation.INSERT, TestOperation.MERGE };
    workloadConfs.add(new TestWorkloadConf(insertMergeOps, ProbabilityHelper.getUniformProbDist(insertMergeOps.length)));
    // Inserts mixed with point searches and scans.
    TestOperation[] insertSearchOnlyOps = new TestOperation[] { TestOperation.INSERT, TestOperation.POINT_SEARCH, TestOperation.SCAN };
    workloadConfs.add(new TestWorkloadConf(insertSearchOnlyOps, ProbabilityHelper.getUniformProbDist(insertSearchOnlyOps.length)));
    // Inserts, updates, and deletes.
    TestOperation[] insertDeleteUpdateOps = new TestOperation[] { TestOperation.INSERT, TestOperation.DELETE, TestOperation.UPDATE };
    workloadConfs.add(new TestWorkloadConf(insertDeleteUpdateOps, ProbabilityHelper.getUniformProbDist(insertDeleteUpdateOps.length)));
    // Inserts, updates, deletes and merges.
    TestOperation[] insertDeleteUpdateMergeOps = new TestOperation[] { TestOperation.INSERT, TestOperation.DELETE, TestOperation.UPDATE, TestOperation.MERGE };
    workloadConfs.add(new TestWorkloadConf(insertDeleteUpdateMergeOps, ProbabilityHelper.getUniformProbDist(insertDeleteUpdateMergeOps.length)));
    // All operations except merge.
    TestOperation[] allNoMergeOps = new TestOperation[] { TestOperation.INSERT, TestOperation.DELETE, TestOperation.UPDATE, TestOperation.POINT_SEARCH, TestOperation.SCAN };
    workloadConfs.add(new TestWorkloadConf(allNoMergeOps, ProbabilityHelper.getUniformProbDist(allNoMergeOps.length)));
    // All operations.
    TestOperation[] allOps = new TestOperation[] { TestOperation.INSERT, TestOperation.DELETE, TestOperation.UPDATE, TestOperation.POINT_SEARCH, TestOperation.SCAN, TestOperation.MERGE };
    workloadConfs.add(new TestWorkloadConf(allOps, ProbabilityHelper.getUniformProbDist(allOps.length)));
    return workloadConfs;
}
Also used : TestOperation(org.apache.hyracks.storage.am.common.TestOperationSelector.TestOperation) TestWorkloadConf(org.apache.hyracks.storage.am.common.TestWorkloadConf) ArrayList(java.util.ArrayList)

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