Search in sources :

Example 21 with BackendColumn

use of com.baidu.hugegraph.backend.store.BackendEntry.BackendColumn in project incubator-hugegraph by apache.

the class RocksDBPerfTest method testScanByPrefixAfterUpdate.

@Test
public void testScanByPrefixAfterUpdate() throws RocksDBException {
    Session session = this.rocks.session();
    this.testUpdate();
    int n = 1000;
    // 30w
    int queryTimes = 300;
    for (int j = 0; j < queryTimes; j++) {
        for (int i = 0; i < n; i++) {
            String key = String.format("index:%3d", i);
            Iterator<BackendColumn> iter = session.scan(TABLE, getBytes(key));
            while (iter.hasNext()) {
                iter.next();
            }
        }
    }
}
Also used : BackendColumn(com.baidu.hugegraph.backend.store.BackendEntry.BackendColumn) Session(com.baidu.hugegraph.backend.store.rocksdb.RocksDBSessions.Session) Test(org.junit.Test)

Aggregations

BackendColumn (com.baidu.hugegraph.backend.store.BackendEntry.BackendColumn)21 Test (org.junit.Test)15 BaseUnitTest (com.baidu.hugegraph.unit.BaseUnitTest)11 Session (com.baidu.hugegraph.backend.store.rocksdb.RocksDBSessions.Session)9 BinaryBackendEntry (com.baidu.hugegraph.backend.serializer.BinaryBackendEntry)5 HashMap (java.util.HashMap)5 Id (com.baidu.hugegraph.backend.id.Id)4 EdgeId (com.baidu.hugegraph.backend.id.EdgeId)3 BinaryId (com.baidu.hugegraph.backend.serializer.BinaryBackendEntry.BinaryId)3 HugeVertex (com.baidu.hugegraph.structure.HugeVertex)2 ByteBuffer (java.nio.ByteBuffer)2 BytesBuffer (com.baidu.hugegraph.backend.serializer.BytesBuffer)1 TableBackendEntry (com.baidu.hugegraph.backend.serializer.TableBackendEntry)1 TextBackendEntry (com.baidu.hugegraph.backend.serializer.TextBackendEntry)1 BackendAction (com.baidu.hugegraph.backend.store.BackendAction)1 BackendEntry (com.baidu.hugegraph.backend.store.BackendEntry)1 VertexLabel (com.baidu.hugegraph.schema.VertexLabel)1