Search in sources :

Example 1 with BTreeLeafFrameType

use of org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType in project asterixdb by apache.

the class OrderedIndexTestDriver method oneStringKeyAndValue.

@Test
public void oneStringKeyAndValue() throws Exception {
    if (LOGGER.isLoggable(Level.INFO)) {
        LOGGER.info("BTree " + getTestOpName() + " Test With One String Key And Value.");
    }
    ISerializerDeserializer[] fieldSerdes = { new UTF8StringSerializerDeserializer(), new UTF8StringSerializerDeserializer() };
    // Range search in ["cbf", cc7"]
    ITupleReference lowKey = TupleUtils.createTuple(fieldSerdes, "cbf");
    ITupleReference highKey = TupleUtils.createTuple(fieldSerdes, "cc7");
    for (BTreeLeafFrameType leafFrameType : leafFrameTypesToTest) {
        runTest(fieldSerdes, 1, leafFrameType, lowKey, highKey, null, null);
    }
}
Also used : ITupleReference(org.apache.hyracks.dataflow.common.data.accessors.ITupleReference) UTF8StringSerializerDeserializer(org.apache.hyracks.dataflow.common.data.marshalling.UTF8StringSerializerDeserializer) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer) BTreeLeafFrameType(org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType) Test(org.junit.Test)

Example 2 with BTreeLeafFrameType

use of org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType in project asterixdb by apache.

the class OrderedIndexTestDriver method twoStringKeysAndValues.

@Test
public void twoStringKeysAndValues() throws Exception {
    if (LOGGER.isLoggable(Level.INFO)) {
        LOGGER.info("BTree " + getTestOpName() + " Test With Two String Keys And Values.");
    }
    ISerializerDeserializer[] fieldSerdes = { new UTF8StringSerializerDeserializer(), new UTF8StringSerializerDeserializer(), new UTF8StringSerializerDeserializer(), new UTF8StringSerializerDeserializer() };
    // Range search in ["cbf", "ddd", cc7", "eee"]
    ITupleReference lowKey = TupleUtils.createTuple(fieldSerdes, "cbf", "ddd");
    ITupleReference highKey = TupleUtils.createTuple(fieldSerdes, "cc7", "eee");
    // Prefix range search in ["cbf", cc7"]
    ITupleReference prefixLowKey = TupleUtils.createTuple(fieldSerdes, "cbf");
    ITupleReference prefixHighKey = TupleUtils.createTuple(fieldSerdes, "cc7");
    for (BTreeLeafFrameType leafFrameType : leafFrameTypesToTest) {
        runTest(fieldSerdes, 2, leafFrameType, lowKey, highKey, prefixLowKey, prefixHighKey);
    }
}
Also used : ITupleReference(org.apache.hyracks.dataflow.common.data.accessors.ITupleReference) UTF8StringSerializerDeserializer(org.apache.hyracks.dataflow.common.data.marshalling.UTF8StringSerializerDeserializer) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer) BTreeLeafFrameType(org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType) Test(org.junit.Test)

Example 3 with BTreeLeafFrameType

use of org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType in project asterixdb by apache.

the class OrderedIndexTestDriver method twoIntKeysAndValues.

@Test
public void twoIntKeysAndValues() throws Exception {
    if (LOGGER.isLoggable(Level.INFO)) {
        LOGGER.info("BTree " + getTestOpName() + " Test With Two Int Keys And Values.");
    }
    ISerializerDeserializer[] fieldSerdes = { IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE };
    // Range search in [50 100, 100 100]
    ITupleReference lowKey = TupleUtils.createIntegerTuple(-100, -100);
    ITupleReference highKey = TupleUtils.createIntegerTuple(100, 100);
    // Prefix range search in [50, 50]
    ITupleReference prefixLowKey = TupleUtils.createIntegerTuple(50);
    ITupleReference prefixHighKey = TupleUtils.createIntegerTuple(50);
    for (BTreeLeafFrameType leafFrameType : leafFrameTypesToTest) {
        runTest(fieldSerdes, 2, leafFrameType, lowKey, highKey, prefixLowKey, prefixHighKey);
    }
}
Also used : ITupleReference(org.apache.hyracks.dataflow.common.data.accessors.ITupleReference) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer) BTreeLeafFrameType(org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType) Test(org.junit.Test)

Example 4 with BTreeLeafFrameType

use of org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType in project asterixdb by apache.

the class OrderedIndexTestDriver method twoStringKeys.

@Test
public void twoStringKeys() throws Exception {
    if (LOGGER.isLoggable(Level.INFO)) {
        LOGGER.info("BTree " + getTestOpName() + " Test With Two String Keys.");
    }
    ISerializerDeserializer[] fieldSerdes = { new UTF8StringSerializerDeserializer(), new UTF8StringSerializerDeserializer() };
    // Range search in ["cbf", "ddd", cc7", "eee"]
    ITupleReference lowKey = TupleUtils.createTuple(fieldSerdes, "cbf", "ddd");
    ITupleReference highKey = TupleUtils.createTuple(fieldSerdes, "cc7", "eee");
    // Prefix range search in ["cbf", cc7"]
    ITupleReference prefixLowKey = TupleUtils.createTuple(fieldSerdes, "cbf");
    ITupleReference prefixHighKey = TupleUtils.createTuple(fieldSerdes, "cc7");
    for (BTreeLeafFrameType leafFrameType : leafFrameTypesToTest) {
        runTest(fieldSerdes, 2, leafFrameType, lowKey, highKey, prefixLowKey, prefixHighKey);
    }
}
Also used : ITupleReference(org.apache.hyracks.dataflow.common.data.accessors.ITupleReference) UTF8StringSerializerDeserializer(org.apache.hyracks.dataflow.common.data.marshalling.UTF8StringSerializerDeserializer) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer) BTreeLeafFrameType(org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType) Test(org.junit.Test)

Example 5 with BTreeLeafFrameType

use of org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType in project asterixdb by apache.

the class OrderedIndexTestDriver method oneIntKeyAndValue.

@Test
public void oneIntKeyAndValue() throws Exception {
    if (LOGGER.isLoggable(Level.INFO)) {
        LOGGER.info("BTree " + getTestOpName() + " Test With One Int Key And Value.");
    }
    ISerializerDeserializer[] fieldSerdes = { IntegerSerializerDeserializer.INSTANCE, IntegerSerializerDeserializer.INSTANCE };
    // Range search in [-1000, 1000]
    ITupleReference lowKey = TupleUtils.createIntegerTuple(-1000);
    ITupleReference highKey = TupleUtils.createIntegerTuple(1000);
    for (BTreeLeafFrameType leafFrameType : leafFrameTypesToTest) {
        runTest(fieldSerdes, 1, leafFrameType, lowKey, highKey, null, null);
    }
}
Also used : ITupleReference(org.apache.hyracks.dataflow.common.data.accessors.ITupleReference) ISerializerDeserializer(org.apache.hyracks.api.dataflow.value.ISerializerDeserializer) BTreeLeafFrameType(org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType) Test(org.junit.Test)

Aggregations

ISerializerDeserializer (org.apache.hyracks.api.dataflow.value.ISerializerDeserializer)6 ITupleReference (org.apache.hyracks.dataflow.common.data.accessors.ITupleReference)6 BTreeLeafFrameType (org.apache.hyracks.storage.am.btree.frames.BTreeLeafFrameType)6 Test (org.junit.Test)6 UTF8StringSerializerDeserializer (org.apache.hyracks.dataflow.common.data.marshalling.UTF8StringSerializerDeserializer)3