Search in sources :

Example 1 with Tuple

use of io.vavr.Tuple in project janusgraph by JanusGraph.

the class CQLResultSetKeyIteratorTest method testPartialIterateColumns.

@Test
public void testPartialIterateColumns() throws IOException {
    final Random random = new Random();
    final Function1<Integer, ByteBuffer> randomLong = idx -> {
        final ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES).putLong(random.nextLong());
        buffer.flip();
        return buffer;
    };
    final Array<Tuple2<ByteBuffer, Array<Tuple2<ByteBuffer, ByteBuffer>>>> keysMap = Array.range(0, random.nextInt(100) + 100).map(randomLong).map(key -> Tuple.of(key, Array.rangeClosed(0, random.nextInt(100) + 1).map(idx -> Tuple.of(randomLong.apply(idx), randomLong.apply(idx)))));
    final Seq<Row> rows = keysMap.flatMap(tuple -> tuple._2.map(columnAndValue -> {
        final Row row = mock(Row.class);
        when(row.getBytes("key")).thenReturn(tuple._1);
        when(row.getBytes("column1")).thenReturn(columnAndValue._1);
        when(row.getBytes("value")).thenReturn(columnAndValue._2);
        return row;
    }));
    final ResultSet resultSet = mock(ResultSet.class);
    when(resultSet.iterator()).thenReturn(rows.iterator());
    final CQLColValGetter getter = new CQLColValGetter(new EntryMetaData[0]);
    try (final CQLResultSetKeyIterator resultSetKeyIterator = new CQLResultSetKeyIterator(ALL_COLUMNS, getter, resultSet)) {
        final Iterator<Tuple2<ByteBuffer, Array<Tuple2<ByteBuffer, ByteBuffer>>>> iterator = keysMap.iterator();
        while (resultSetKeyIterator.hasNext()) {
            final StaticBuffer next = resultSetKeyIterator.next();
            try (final RecordIterator<Entry> entries = resultSetKeyIterator.getEntries()) {
                final Tuple2<ByteBuffer, Array<Tuple2<ByteBuffer, ByteBuffer>>> current = iterator.next();
                final ByteBuffer currentKey = current._1;
                final Array<Tuple2<ByteBuffer, ByteBuffer>> columnValues = current._2;
                final Iterator<Tuple2<ByteBuffer, ByteBuffer>> columnIterator = columnValues.iterator();
                while (entries.hasNext()) {
                    final Entry entry = entries.next();
                    final Tuple2<ByteBuffer, ByteBuffer> columnAndValue = columnIterator.next();
                    assertEquals(currentKey, next.asByteBuffer());
                    assertEquals(columnAndValue._1, entry.getColumn().asByteBuffer());
                    assertEquals(columnAndValue._2, entry.getValue().asByteBuffer());
                    assertEquals(columnIterator.hasNext(), entries.hasNext());
                    // 10% of the time, don't complete the iteration
                    if (random.nextInt(10) == 0) {
                        break;
                    }
                }
            }
        }
    }
}
Also used : Tuple(io.vavr.Tuple) EntryMetaData(org.janusgraph.diskstorage.EntryMetaData) Row(com.datastax.driver.core.Row) SliceQuery(org.janusgraph.diskstorage.keycolumnvalue.SliceQuery) Array(io.vavr.collection.Array) IOException(java.io.IOException) Random(java.util.Random) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) Function1(io.vavr.Function1) ByteBuffer(java.nio.ByteBuffer) RecordIterator(org.janusgraph.diskstorage.util.RecordIterator) ResultSet(com.datastax.driver.core.ResultSet) Tuple2(io.vavr.Tuple2) Assert.assertFalse(org.junit.Assert.assertFalse) Entry(org.janusgraph.diskstorage.Entry) StaticBuffer(org.janusgraph.diskstorage.StaticBuffer) BufferUtil(org.janusgraph.diskstorage.util.BufferUtil) Iterator(io.vavr.collection.Iterator) Seq(io.vavr.collection.Seq) Assert.assertEquals(org.junit.Assert.assertEquals) Mockito.mock(org.mockito.Mockito.mock) ByteBuffer(java.nio.ByteBuffer) Array(io.vavr.collection.Array) Entry(org.janusgraph.diskstorage.Entry) Random(java.util.Random) Tuple2(io.vavr.Tuple2) ResultSet(com.datastax.driver.core.ResultSet) StaticBuffer(org.janusgraph.diskstorage.StaticBuffer) Row(com.datastax.driver.core.Row) Test(org.junit.Test)

Example 2 with Tuple

use of io.vavr.Tuple in project janusgraph by JanusGraph.

the class CQLStoreManager method initializeCluster.

Cluster initializeCluster() throws PermanentBackendException {
    final Configuration configuration = getStorageConfig();
    final List<InetSocketAddress> contactPoints;
    try {
        contactPoints = Array.of(this.hostnames).map(hostName -> hostName.split(":")).map(array -> Tuple.of(array[0], array.length == 2 ? Integer.parseInt(array[1]) : this.port)).map(tuple -> new InetSocketAddress(tuple._1, tuple._2)).toJavaList();
    } catch (SecurityException | ArrayIndexOutOfBoundsException | NumberFormatException e) {
        throw new PermanentBackendException("Error initialising cluster contact points", e);
    }
    final Builder builder = Cluster.builder().addContactPointsWithPorts(contactPoints).withClusterName(configuration.get(CLUSTER_NAME));
    if (configuration.get(PROTOCOL_VERSION) != 0) {
        builder.withProtocolVersion(ProtocolVersion.fromInt(configuration.get(PROTOCOL_VERSION)));
    }
    if (configuration.has(AUTH_USERNAME) && configuration.has(AUTH_PASSWORD)) {
        builder.withCredentials(configuration.get(AUTH_USERNAME), configuration.get(AUTH_PASSWORD));
    }
    if (configuration.has(LOCAL_DATACENTER)) {
        builder.withLoadBalancingPolicy(new TokenAwarePolicy(DCAwareRoundRobinPolicy.builder().withLocalDc(configuration.get(LOCAL_DATACENTER)).build()));
    }
    if (configuration.get(SSL_ENABLED)) {
        try {
            final TrustManager[] trustManagers;
            try (final FileInputStream keyStoreStream = new FileInputStream(configuration.get(SSL_TRUSTSTORE_LOCATION))) {
                final KeyStore keystore = KeyStore.getInstance("jks");
                keystore.load(keyStoreStream, configuration.get(SSL_TRUSTSTORE_PASSWORD).toCharArray());
                final TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
                trustManagerFactory.init(keystore);
                trustManagers = trustManagerFactory.getTrustManagers();
            }
            final SSLContext sslContext = SSLContext.getInstance("TLS");
            sslContext.init(null, trustManagers, null);
            final JdkSSLOptions sslOptions = JdkSSLOptions.builder().withSSLContext(sslContext).build();
            builder.withSSL(sslOptions);
        } catch (NoSuchAlgorithmException | CertificateException | IOException | KeyStoreException | KeyManagementException e) {
            throw new PermanentBackendException("Error initialising SSL connection properties", e);
        }
    }
    // Build the PoolingOptions based on the configurations
    PoolingOptions poolingOptions = new PoolingOptions();
    poolingOptions.setMaxRequestsPerConnection(HostDistance.LOCAL, configuration.get(LOCAL_MAX_REQUESTS_PER_CONNECTION)).setMaxRequestsPerConnection(HostDistance.REMOTE, configuration.get(REMOTE_MAX_REQUESTS_PER_CONNECTION));
    poolingOptions.setConnectionsPerHost(HostDistance.LOCAL, configuration.get(LOCAL_CORE_CONNECTIONS_PER_HOST), configuration.get(LOCAL_MAX_CONNECTIONS_PER_HOST)).setConnectionsPerHost(HostDistance.REMOTE, configuration.get(REMOTE_CORE_CONNECTIONS_PER_HOST), configuration.get(REMOTE_MAX_CONNECTIONS_PER_HOST));
    return builder.withPoolingOptions(poolingOptions).build();
}
Also used : Match(io.vavr.API.Match) PoolingOptions(com.datastax.driver.core.PoolingOptions) GRAPH_NAME(org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.GRAPH_NAME) SSLContext(javax.net.ssl.SSLContext) REMOTE_MAX_REQUESTS_PER_CONNECTION(org.janusgraph.diskstorage.cql.CQLConfigOptions.REMOTE_MAX_REQUESTS_PER_CONNECTION) TrustManager(javax.net.ssl.TrustManager) KeyStoreException(java.security.KeyStoreException) REMOTE_CORE_CONNECTIONS_PER_HOST(org.janusgraph.diskstorage.cql.CQLConfigOptions.REMOTE_CORE_CONNECTIONS_PER_HOST) StandardStoreFeatures(org.janusgraph.diskstorage.keycolumnvalue.StandardStoreFeatures) REMOTE_MAX_CONNECTIONS_PER_HOST(org.janusgraph.diskstorage.cql.CQLConfigOptions.REMOTE_MAX_CONNECTIONS_PER_HOST) Option(io.vavr.control.Option) Map(java.util.Map) Session(com.datastax.driver.core.Session) TokenAwarePolicy(com.datastax.driver.core.policies.TokenAwarePolicy) StaticBuffer(org.janusgraph.diskstorage.StaticBuffer) SSL_TRUSTSTORE_LOCATION(org.janusgraph.diskstorage.cql.CQLConfigOptions.SSL_TRUSTSTORE_LOCATION) Iterator(io.vavr.collection.Iterator) SchemaBuilder.dropKeyspace(com.datastax.driver.core.schemabuilder.SchemaBuilder.dropKeyspace) BatchStatement(com.datastax.driver.core.BatchStatement) LOCAL_MAX_CONNECTIONS_PER_HOST(org.janusgraph.diskstorage.cql.CQLConfigOptions.LOCAL_MAX_CONNECTIONS_PER_HOST) KEYSPACE(org.janusgraph.diskstorage.cql.CQLConfigOptions.KEYSPACE) KCVMutation(org.janusgraph.diskstorage.keycolumnvalue.KCVMutation) NetworkUtil(org.janusgraph.util.system.NetworkUtil) Tuple(io.vavr.Tuple) TrustManagerFactory(javax.net.ssl.TrustManagerFactory) READ_CONSISTENCY(org.janusgraph.diskstorage.cql.CQLConfigOptions.READ_CONSISTENCY) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Array(io.vavr.collection.Array) Case(io.vavr.API.Case) KeyStore(java.security.KeyStore) KeyManagementException(java.security.KeyManagementException) InetSocketAddress(java.net.InetSocketAddress) LinkedBlockingQueue(java.util.concurrent.LinkedBlockingQueue) StoreFeatures(org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures) GraphDatabaseConfiguration.buildGraphConfiguration(org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.buildGraphConfiguration) REPLICATION_FACTOR(org.janusgraph.diskstorage.cql.CQLConfigOptions.REPLICATION_FACTOR) KeyColumnValueStore(org.janusgraph.diskstorage.keycolumnvalue.KeyColumnValueStore) Builder(com.datastax.driver.core.Cluster.Builder) ProtocolVersion(com.datastax.driver.core.ProtocolVersion) List(java.util.List) METRICS_SYSTEM_PREFIX_DEFAULT(org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.METRICS_SYSTEM_PREFIX_DEFAULT) DROP_ON_CLEAR(org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.DROP_ON_CLEAR) Cluster(com.datastax.driver.core.Cluster) ATOMIC_BATCH_MUTATE(org.janusgraph.diskstorage.cql.CQLConfigOptions.ATOMIC_BATCH_MUTATE) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) HostDistance(com.datastax.driver.core.HostDistance) SSL_TRUSTSTORE_PASSWORD(org.janusgraph.diskstorage.cql.CQLConfigOptions.SSL_TRUSTSTORE_PASSWORD) AUTH_PASSWORD(org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.AUTH_PASSWORD) Statement(com.datastax.driver.core.Statement) EXCEPTION_MAPPER(org.janusgraph.diskstorage.cql.CQLKeyColumnValueStore.EXCEPTION_MAPPER) KeyRange(org.janusgraph.diskstorage.keycolumnvalue.KeyRange) ThreadFactoryBuilder(com.google.common.util.concurrent.ThreadFactoryBuilder) CLUSTER_NAME(org.janusgraph.diskstorage.cql.CQLConfigOptions.CLUSTER_NAME) DistributedStoreManager(org.janusgraph.diskstorage.common.DistributedStoreManager) ThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor) BATCH_STATEMENT_SIZE(org.janusgraph.diskstorage.cql.CQLConfigOptions.BATCH_STATEMENT_SIZE) METRICS_PREFIX(org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.METRICS_PREFIX) LOCAL_CORE_CONNECTIONS_PER_HOST(org.janusgraph.diskstorage.cql.CQLConfigOptions.LOCAL_CORE_CONNECTIONS_PER_HOST) REPLICATION_OPTIONS(org.janusgraph.diskstorage.cql.CQLConfigOptions.REPLICATION_OPTIONS) ONLY_USE_LOCAL_CONSISTENCY_FOR_SYSTEM_OPERATIONS(org.janusgraph.diskstorage.cql.CQLConfigOptions.ONLY_USE_LOCAL_CONSISTENCY_FOR_SYSTEM_OPERATIONS) ResultSet(com.datastax.driver.core.ResultSet) CQLTransaction.getTransaction(org.janusgraph.diskstorage.cql.CQLTransaction.getTransaction) Type(com.datastax.driver.core.BatchStatement.Type) WRITE_CONSISTENCY(org.janusgraph.diskstorage.cql.CQLConfigOptions.WRITE_CONSISTENCY) Future(io.vavr.concurrent.Future) SchemaBuilder.createKeyspace(com.datastax.driver.core.schemabuilder.SchemaBuilder.createKeyspace) AUTH_USERNAME(org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.AUTH_USERNAME) Container(org.janusgraph.diskstorage.StoreMetaData.Container) LOCAL_MAX_REQUESTS_PER_CONNECTION(org.janusgraph.diskstorage.cql.CQLConfigOptions.LOCAL_MAX_REQUESTS_PER_CONNECTION) KeyColumnValueStoreManager(org.janusgraph.diskstorage.keycolumnvalue.KeyColumnValueStoreManager) StoreTransaction(org.janusgraph.diskstorage.keycolumnvalue.StoreTransaction) ExecutorService(java.util.concurrent.ExecutorService) API.$(io.vavr.API.$) SSL_ENABLED(org.janusgraph.diskstorage.cql.CQLConfigOptions.SSL_ENABLED) BackendException(org.janusgraph.diskstorage.BackendException) Configuration(org.janusgraph.diskstorage.configuration.Configuration) HashMap(io.vavr.collection.HashMap) LOCAL_DATACENTER(org.janusgraph.diskstorage.cql.CQLConfigOptions.LOCAL_DATACENTER) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream) CertificateException(java.security.cert.CertificateException) REPLICATION_STRATEGY(org.janusgraph.diskstorage.cql.CQLConfigOptions.REPLICATION_STRATEGY) PROTOCOL_VERSION(org.janusgraph.diskstorage.cql.CQLConfigOptions.PROTOCOL_VERSION) TimeUnit(java.util.concurrent.TimeUnit) JdkSSLOptions(com.datastax.driver.core.JdkSSLOptions) KeyspaceMetadata(com.datastax.driver.core.KeyspaceMetadata) BaseTransactionConfig(org.janusgraph.diskstorage.BaseTransactionConfig) QueryBuilder.truncate(com.datastax.driver.core.querybuilder.QueryBuilder.truncate) Seq(io.vavr.collection.Seq) PermanentBackendException(org.janusgraph.diskstorage.PermanentBackendException) DCAwareRoundRobinPolicy(com.datastax.driver.core.policies.DCAwareRoundRobinPolicy) GraphDatabaseConfiguration.buildGraphConfiguration(org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.buildGraphConfiguration) Configuration(org.janusgraph.diskstorage.configuration.Configuration) InetSocketAddress(java.net.InetSocketAddress) Builder(com.datastax.driver.core.Cluster.Builder) ThreadFactoryBuilder(com.google.common.util.concurrent.ThreadFactoryBuilder) CertificateException(java.security.cert.CertificateException) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) KeyManagementException(java.security.KeyManagementException) JdkSSLOptions(com.datastax.driver.core.JdkSSLOptions) PoolingOptions(com.datastax.driver.core.PoolingOptions) TokenAwarePolicy(com.datastax.driver.core.policies.TokenAwarePolicy) PermanentBackendException(org.janusgraph.diskstorage.PermanentBackendException) SSLContext(javax.net.ssl.SSLContext) IOException(java.io.IOException) KeyStoreException(java.security.KeyStoreException) KeyStore(java.security.KeyStore) FileInputStream(java.io.FileInputStream) TrustManager(javax.net.ssl.TrustManager) TrustManagerFactory(javax.net.ssl.TrustManagerFactory)

Example 3 with Tuple

use of io.vavr.Tuple in project janusgraph by JanusGraph.

the class CQLResultSetKeyIteratorTest method testUneven.

@Test
public void testUneven() throws IOException {
    final Random random = new Random();
    final Function1<Integer, ByteBuffer> randomLong = idx -> {
        final ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES).putLong(random.nextLong());
        buffer.flip();
        return buffer;
    };
    final Array<Tuple2<ByteBuffer, Array<Tuple2<ByteBuffer, ByteBuffer>>>> keysMap = Array.range(0, random.nextInt(100) + 100).map(randomLong).map(key -> Tuple.of(key, Array.rangeClosed(0, random.nextInt(100) + 1).map(idx -> Tuple.of(randomLong.apply(idx), randomLong.apply(idx)))));
    final Seq<Row> rows = keysMap.flatMap(tuple -> tuple._2.map(columnAndValue -> {
        final Row row = mock(Row.class);
        when(row.getBytes("key")).thenReturn(tuple._1);
        when(row.getBytes("column1")).thenReturn(columnAndValue._1);
        when(row.getBytes("value")).thenReturn(columnAndValue._2);
        return row;
    }));
    final ResultSet resultSet = mock(ResultSet.class);
    when(resultSet.iterator()).thenReturn(rows.iterator());
    final CQLColValGetter getter = new CQLColValGetter(new EntryMetaData[0]);
    try (final CQLResultSetKeyIterator resultSetKeyIterator = new CQLResultSetKeyIterator(ALL_COLUMNS, getter, resultSet)) {
        final Iterator<Tuple2<ByteBuffer, Array<Tuple2<ByteBuffer, ByteBuffer>>>> iterator = keysMap.iterator();
        while (resultSetKeyIterator.hasNext()) {
            final StaticBuffer next = resultSetKeyIterator.next();
            try (final RecordIterator<Entry> entries = resultSetKeyIterator.getEntries()) {
                final Tuple2<ByteBuffer, Array<Tuple2<ByteBuffer, ByteBuffer>>> current = iterator.next();
                final ByteBuffer currentKey = current._1;
                final Array<Tuple2<ByteBuffer, ByteBuffer>> columnValues = current._2;
                final Iterator<Tuple2<ByteBuffer, ByteBuffer>> columnIterator = columnValues.iterator();
                while (entries.hasNext()) {
                    final Entry entry = entries.next();
                    final Tuple2<ByteBuffer, ByteBuffer> columnAndValue = columnIterator.next();
                    assertEquals(currentKey, next.asByteBuffer());
                    assertEquals(columnAndValue._1, entry.getColumn().asByteBuffer());
                    assertEquals(columnAndValue._2, entry.getValue().asByteBuffer());
                    assertEquals(columnIterator.hasNext(), entries.hasNext());
                }
            }
        }
    }
}
Also used : Tuple(io.vavr.Tuple) EntryMetaData(org.janusgraph.diskstorage.EntryMetaData) Row(com.datastax.driver.core.Row) SliceQuery(org.janusgraph.diskstorage.keycolumnvalue.SliceQuery) Array(io.vavr.collection.Array) IOException(java.io.IOException) Random(java.util.Random) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) Function1(io.vavr.Function1) ByteBuffer(java.nio.ByteBuffer) RecordIterator(org.janusgraph.diskstorage.util.RecordIterator) ResultSet(com.datastax.driver.core.ResultSet) Tuple2(io.vavr.Tuple2) Assert.assertFalse(org.junit.Assert.assertFalse) Entry(org.janusgraph.diskstorage.Entry) StaticBuffer(org.janusgraph.diskstorage.StaticBuffer) BufferUtil(org.janusgraph.diskstorage.util.BufferUtil) Iterator(io.vavr.collection.Iterator) Seq(io.vavr.collection.Seq) Assert.assertEquals(org.junit.Assert.assertEquals) Mockito.mock(org.mockito.Mockito.mock) ByteBuffer(java.nio.ByteBuffer) Array(io.vavr.collection.Array) Entry(org.janusgraph.diskstorage.Entry) Random(java.util.Random) Tuple2(io.vavr.Tuple2) ResultSet(com.datastax.driver.core.ResultSet) StaticBuffer(org.janusgraph.diskstorage.StaticBuffer) Row(com.datastax.driver.core.Row) Test(org.junit.Test)

Example 4 with Tuple

use of io.vavr.Tuple in project janusgraph by JanusGraph.

the class CQLResultSetKeyIteratorTest method testNoIterateColumns.

@Test
public void testNoIterateColumns() throws IOException {
    final Random random = new Random();
    final Function1<Integer, ByteBuffer> randomLong = idx -> {
        final ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES).putLong(random.nextLong());
        buffer.flip();
        return buffer;
    };
    final Array<Tuple2<ByteBuffer, Array<Tuple2<ByteBuffer, ByteBuffer>>>> keysMap = Array.range(0, random.nextInt(100) + 100).map(randomLong).map(key -> Tuple.of(key, Array.rangeClosed(0, random.nextInt(100) + 1).map(idx -> Tuple.of(randomLong.apply(idx), randomLong.apply(idx)))));
    final Seq<Row> rows = keysMap.flatMap(tuple -> tuple._2.map(columnAndValue -> {
        final Row row = mock(Row.class);
        when(row.getBytes("key")).thenReturn(tuple._1);
        when(row.getBytes("column1")).thenReturn(columnAndValue._1);
        when(row.getBytes("value")).thenReturn(columnAndValue._2);
        return row;
    }));
    final ResultSet resultSet = mock(ResultSet.class);
    when(resultSet.iterator()).thenReturn(rows.iterator());
    final CQLColValGetter getter = new CQLColValGetter(new EntryMetaData[0]);
    try (final CQLResultSetKeyIterator resultSetKeyIterator = new CQLResultSetKeyIterator(ALL_COLUMNS, getter, resultSet)) {
        final Iterator<Tuple2<ByteBuffer, Array<Tuple2<ByteBuffer, ByteBuffer>>>> iterator = keysMap.iterator();
        while (resultSetKeyIterator.hasNext()) {
            final StaticBuffer next = resultSetKeyIterator.next();
            assertEquals(iterator.next()._1, next.asByteBuffer());
        }
    }
}
Also used : Tuple(io.vavr.Tuple) EntryMetaData(org.janusgraph.diskstorage.EntryMetaData) Row(com.datastax.driver.core.Row) SliceQuery(org.janusgraph.diskstorage.keycolumnvalue.SliceQuery) Array(io.vavr.collection.Array) IOException(java.io.IOException) Random(java.util.Random) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) Function1(io.vavr.Function1) ByteBuffer(java.nio.ByteBuffer) RecordIterator(org.janusgraph.diskstorage.util.RecordIterator) ResultSet(com.datastax.driver.core.ResultSet) Tuple2(io.vavr.Tuple2) Assert.assertFalse(org.junit.Assert.assertFalse) Entry(org.janusgraph.diskstorage.Entry) StaticBuffer(org.janusgraph.diskstorage.StaticBuffer) BufferUtil(org.janusgraph.diskstorage.util.BufferUtil) Iterator(io.vavr.collection.Iterator) Seq(io.vavr.collection.Seq) Assert.assertEquals(org.junit.Assert.assertEquals) Mockito.mock(org.mockito.Mockito.mock) ByteBuffer(java.nio.ByteBuffer) Random(java.util.Random) Tuple2(io.vavr.Tuple2) ResultSet(com.datastax.driver.core.ResultSet) StaticBuffer(org.janusgraph.diskstorage.StaticBuffer) Row(com.datastax.driver.core.Row) Test(org.junit.Test)

Aggregations

ResultSet (com.datastax.driver.core.ResultSet)4 Tuple (io.vavr.Tuple)4 Array (io.vavr.collection.Array)4 Iterator (io.vavr.collection.Iterator)4 Seq (io.vavr.collection.Seq)4 IOException (java.io.IOException)4 StaticBuffer (org.janusgraph.diskstorage.StaticBuffer)4 Row (com.datastax.driver.core.Row)3 Function1 (io.vavr.Function1)3 Tuple2 (io.vavr.Tuple2)3 ByteBuffer (java.nio.ByteBuffer)3 Random (java.util.Random)3 Entry (org.janusgraph.diskstorage.Entry)3 EntryMetaData (org.janusgraph.diskstorage.EntryMetaData)3 SliceQuery (org.janusgraph.diskstorage.keycolumnvalue.SliceQuery)3 BufferUtil (org.janusgraph.diskstorage.util.BufferUtil)3 RecordIterator (org.janusgraph.diskstorage.util.RecordIterator)3 Assert.assertEquals (org.junit.Assert.assertEquals)3 Assert.assertFalse (org.junit.Assert.assertFalse)3 Test (org.junit.Test)3