当前位置: 首页>>代码示例>>Java>>正文


Java OrderedKeyStoreTests类代码示例

本文整理汇总了Java中com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests的典型用法代码示例。如果您正苦于以下问题:Java OrderedKeyStoreTests类的具体用法?Java OrderedKeyStoreTests怎么用?Java OrderedKeyStoreTests使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


OrderedKeyStoreTests类属于com.thinkaurelius.titan.testcategory包,在下文中一共展示了OrderedKeyStoreTests类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testGetKeysWithKeyRange

import com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests; //导入依赖的package包/类
@Test
@Category({OrderedKeyStoreTests.class})
public void testGetKeysWithKeyRange() throws Exception {
    if (!manager.getFeatures().hasOrderedScan()) {
        log.warn("Can't test ordered scans on incompatible store.  "
                + "This warning could indicate reduced test coverage and "
                + "shouldn't happen in an ideal JUnit configuration.  "
                + "Skipping test {}.", name.getMethodName());
        return;
    }

    populateDBWith100Keys();

    tx.commit();
    tx = startTx();

    KeyIterator keyIterator = store.getKeys(new KeyRangeQuery(
            KeyColumnValueStoreUtil.longToByteBuffer(10), // key start
            KeyColumnValueStoreUtil.longToByteBuffer(40), // key end
            new ReadArrayBuffer("b".getBytes()), // column start
            new ReadArrayBuffer("c".getBytes())), tx);

    examineGetKeysResults(keyIterator, 10, 40, 1);
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:25,代码来源:KeyColumnValueStoreTest.java

示例2: testOrderedConfiguration

import com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests; //导入依赖的package包/类
@Test
@Category({ OrderedKeyStoreTests.class })
public void testOrderedConfiguration() {
    if (!manager.getFeatures().hasOrderedScan()) {
        log.warn(
            "Can't test key-ordered features on incompatible store.  "
            + "This warning could indicate reduced test coverage and "
            + "a broken JUnit configuration.  Skipping test {}.",
            name.getMethodName());
        return;
    }

    StoreFeatures features = manager.getFeatures();
    assertTrue(features.isKeyOrdered());
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:16,代码来源:AbstractCassandraStoreTest.java

示例3: testConfiguration

import com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests; //导入依赖的package包/类
@Test
@Category({ OrderedKeyStoreTests.class })
public void testConfiguration() {
    StoreFeatures features = manager.getFeatures();
    assertTrue(features.isKeyOrdered());
    assertTrue(features.hasLocalKeyPartition());
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:8,代码来源:EmbeddedStoreTest.java

示例4: testGetLocalKeyPartition

import com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests; //导入依赖的package包/类
@Test
@Category({ OrderedKeyStoreTests.class })
public void testGetLocalKeyPartition() throws BackendException {
    List<KeyRange> local = manager.getLocalKeyPartition();
    assertNotNull(local);
    assertEquals(1, local.size());
    assertNotNull(local.get(0).getStart());
    assertNotNull(local.get(0).getEnd());
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:10,代码来源:DistributedStoreManagerTest.java

示例5: testOrderedGetKeysRespectsKeyLimit

import com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests; //导入依赖的package包/类
/**
 * Verify that
 * {@link KeyColumnValueStore#getKeys(KeyRangeQuery, StoreTransaction)}
 * treats the lower key bound as inclusive and the upper key bound as
 * exclusive. Verify that keys less than the start and greater than or equal
 * to the end containing matching columns are not returned.
 *
 * @throws BackendException
 */
@Test
@Category({OrderedKeyStoreTests.class})
public void testOrderedGetKeysRespectsKeyLimit() throws BackendException {
    if (!manager.getFeatures().hasOrderedScan()) {
        log.warn("Can't test key-ordered features on incompatible store.  "
                + "This warning could indicate reduced test coverage and "
                + "a broken JUnit configuration.  Skipping test {}.",
                name.getMethodName());
        return;
    }

    Preconditions.checkArgument(4 <= numKeys);
    Preconditions.checkArgument(4 <= numColumns);

    final long minKey = KeyValueStoreUtil.idOffset + 1;
    final long maxKey = KeyValueStoreUtil.idOffset + numKeys - 2;
    final long expectedKeyCount = maxKey - minKey;

    String[][] values = generateValues();
    loadValues(values);
    final SliceQuery columnSlice = new SliceQuery(BufferUtil.zeroBuffer(8), BufferUtil.oneBuffer(8)).setLimit(1);

    KeyIterator keys;

    keys = store.getKeys(new KeyRangeQuery(BufferUtil.getLongBuffer(minKey), BufferUtil.getLongBuffer(maxKey), columnSlice), tx);
    assertEquals(expectedKeyCount, KeyValueStoreUtil.count(keys));

    clopen();

    keys = store.getKeys(new KeyRangeQuery(BufferUtil.getLongBuffer(minKey), BufferUtil.getLongBuffer(maxKey), columnSlice), tx);
    assertEquals(expectedKeyCount, KeyValueStoreUtil.count(keys));
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:42,代码来源:KeyColumnValueStoreTest.java

示例6: testSetup

import com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests; //导入依赖的package包/类
@Test
@Category({ OrderedKeyStoreTests.class })
public void testSetup() {
    final IDManager idManager = graph.getIDManager();
    assertEquals(8, idManager.getPartitionBound());
    Set<Long> hashs = Sets.newHashSet();
    for (long i=1;i<idManager.getPartitionBound()*2;i++) hashs.add(idManager.getPartitionHashForId(i));
    assertTrue(hashs.size()>idManager.getPartitionBound()/2);
    assertNotEquals(idManager.getPartitionHashForId(101),idManager.getPartitionHashForId(102));
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:11,代码来源:TitanPartitionGraphTest.java

示例7: testVLabelOnOrderedStorage

import com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests; //导入依赖的package包/类
@Test
@Category({ OrderedKeyStoreTests.class })
public void testVLabelOnOrderedStorage() {
    final String label = "pl";
    mgmt.makeVertexLabel(label).partition().make();
    mgmt.commit();
    graph.rollback();
    graph.addVertexWithLabel(label);
    graph.commit();
    mgmt = graph.getManagementSystem();
    VertexLabel vl = mgmt.getVertexLabel(label);
    assertTrue(vl.isPartitioned());
    mgmt.rollback();
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:15,代码来源:TitanPartitionGraphTest.java

示例8: testGetDeployment

import com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests; //导入依赖的package包/类
@Test
@Category({ OrderedKeyStoreTests.class })
public void testGetDeployment() {
    assertEquals(Deployment.LOCAL, manager.getDeployment());
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:6,代码来源:DistributedStoreManagerTest.java

示例9: testGraphOfTheGodsWithBOP

import com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests; //导入依赖的package包/类
@Test
@Category({ OrderedKeyStoreTests.class })
public void testGraphOfTheGodsWithBOP() throws Exception {
    unzipAndRunExpect("faunus-cassandra.expect.vm", ImmutableMap.of("cassandraPartitioner", "org.apache.cassandra.dht.ByteOrderedPartitioner"));
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:6,代码来源:FaunusCassandraIT.java

示例10: testOrderedConfig

import com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests; //导入依赖的package包/类
@Test
@Category({ OrderedKeyStoreTests.class })
public void testOrderedConfig() {
    assertTrue(graph.getConfiguration().isClusterPartitioned());
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:6,代码来源:TitanPartitionGraphTest.java


注:本文中的com.thinkaurelius.titan.testcategory.OrderedKeyStoreTests类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。