use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class CassandraThriftStoreManagerTest method configOptionFrameSizeMbShouldErrorOnHighValue.
@Test(expected = IllegalArgumentException.class)
public void configOptionFrameSizeMbShouldErrorOnHighValue() {
ModifiableConfiguration config = CassandraStorageSetup.getCassandraThriftConfiguration("janusgraph");
config.set(CassandraThriftStoreManager.THRIFT_FRAME_SIZE_MB, 2048);
config.get(CassandraThriftStoreManager.THRIFT_FRAME_SIZE_MB);
}
use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class CassandraThriftStoreManagerTest method configOptionFrameSizeMbShouldBeHappy.
@Test
public void configOptionFrameSizeMbShouldBeHappy() {
ModifiableConfiguration config = CassandraStorageSetup.getCassandraThriftConfiguration("janusgraph");
config.set(CassandraThriftStoreManager.THRIFT_FRAME_SIZE_MB, 1);
Integer result = config.get(CassandraThriftStoreManager.THRIFT_FRAME_SIZE_MB);
assertEquals(1, result.intValue());
}
use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class AbstractCassandraStoreTest method keyspaceShouldBeEquivalentToGraphName.
@Test
public void keyspaceShouldBeEquivalentToGraphName() throws BackendException {
final ModifiableConfiguration config = getBaseStorageConfiguration(null);
config.set(GraphDatabaseConfiguration.GRAPH_NAME, "randomNewGraphName");
final AbstractCassandraStoreManager mgr = openStorageManager(config);
assertEquals("randomNewGraphName", mgr.keySpaceName);
}
use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class AbstractCassandraStoreTest method testCustomCFCompressor.
@Test
public void testCustomCFCompressor() throws BackendException {
final String compressor = "DeflateCompressor";
final int ckb = 128;
final String cf = TEST_CF_NAME + "_gzip";
ModifiableConfiguration config = getBaseStorageConfiguration();
config.set(AbstractCassandraStoreManager.CF_COMPRESSION_TYPE, compressor);
config.set(AbstractCassandraStoreManager.CF_COMPRESSION_BLOCK_SIZE, ckb);
AbstractCassandraStoreManager mgr = openStorageManager(config);
// N.B.: clearStorage() truncates CFs but does not delete them
mgr.openDatabase(cf);
final Map<String, String> expected = ImmutableMap.<String, String>builder().put("sstable_compression", DEFAULT_COMPRESSOR_PACKAGE + "." + compressor).put("chunk_length_kb", String.valueOf(ckb)).build();
assertEquals(expected, mgr.getCompressionOptions(cf));
}
use of org.janusgraph.diskstorage.configuration.ModifiableConfiguration in project janusgraph by JanusGraph.
the class AbstractCassandraStoreTest method keyspaceShouldBeEquivalentToProvidedOne.
@Test
public void keyspaceShouldBeEquivalentToProvidedOne() throws BackendException {
final ModifiableConfiguration config = getBaseStorageConfiguration("randomNewKeyspace");
final AbstractCassandraStoreManager mgr = openStorageManager(config);
assertEquals("randomNewKeyspace", mgr.keySpaceName);
}
Aggregations