本文整理汇总了Java中com.thinkaurelius.titan.CassandraStorageSetup类的典型用法代码示例。如果您正苦于以下问题:Java CassandraStorageSetup类的具体用法?Java CassandraStorageSetup怎么用?Java CassandraStorageSetup使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CassandraStorageSetup类属于com.thinkaurelius.titan包,在下文中一共展示了CassandraStorageSetup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getConfiguration
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@Override
public WriteConfiguration getConfiguration() {
String className = getClass().getSimpleName();
ModifiableConfiguration mc = CassandraStorageSetup.getEmbeddedConfiguration(className);
mc.set(PAGE_SIZE,500);
mc.set(CPOOL_MAX_TOTAL, -1);
mc.set(CPOOL_MAX_ACTIVE, 1);
mc.set(CPOOL_MAX_IDLE, 1);
// ES Index
mc.set(INDEX_BACKEND, "elasticsearch", INDEX_NAME);
mc.set(LOCAL_MODE, false, INDEX_NAME);
mc.set(CLIENT_ONLY, true, INDEX_NAME);
return mc.getConfiguration();
}
示例2: getTitanConfiguration
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@Override
protected ModifiableConfiguration getTitanConfiguration() {
String className = TitanCassandraOutputFormatTest.class.getSimpleName();
ModifiableConfiguration mc = CassandraStorageSetup.getCassandraThriftConfiguration(className);
mc.set(STORAGE_HOSTS, new String[]{"localhost"});
mc.set(DB_CACHE, false);
mc.set(GraphDatabaseConfiguration.LOCK_LOCAL_MEDIATOR_GROUP, "tmp");
return mc;
}
示例3: getConfiguration
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@Override
public WriteConfiguration getConfiguration() {
ModifiableConfiguration config =
CassandraStorageSetup.getCassandraThriftConfiguration(ThriftSolrTest.class.getName());
//Add index
config.set(SolrIndex.ZOOKEEPER_URL, SolrRunner.getMiniCluster().getZkServer().getZkAddress(), INDEX);
config.set(SolrIndex.WAIT_SEARCHER, true, INDEX);
config.set(INDEX_BACKEND,"solr",INDEX);
//TODO: set SOLR specific config options
return config.getConfiguration();
}
示例4: beforeClass
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@BeforeClass
public static void beforeClass() {
String userDir = System.getProperty("user.dir");
String cassandraDirFormat = Joiner.on(File.separator).join(userDir, userDir.contains("titan-solr")
? "target" : "titan-solr/target", "cassandra", "%s", "localhost-murmur");
System.setProperty("test.cassandra.confdir", String.format(cassandraDirFormat, "conf"));
System.setProperty("test.cassandra.datadir", String.format(cassandraDirFormat, "data"));
CassandraStorageSetup.startCleanEmbedded();
}
示例5: startCassandra
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@BeforeClass
public static void startCassandra() {
CassandraStorageSetup.startCleanEmbedded();
}
示例6: openStorageManager
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@Override
public KeyColumnValueStoreManager openStorageManager() throws BackendException {
return new AstyanaxStoreManager(CassandraStorageSetup.getAstyanaxConfiguration(getClass().getSimpleName()));
}
示例7: beforeClass
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@BeforeClass
public static void beforeClass() {
CassandraStorageSetup.startCleanEmbedded();
}
示例8: getBaseStorageConfiguration
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@Override
public ModifiableConfiguration getBaseStorageConfiguration() {
return CassandraStorageSetup.getCassandraThriftConfiguration(this.getClass().getSimpleName());
}
示例9: openStorageManager
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@Override
public KeyColumnValueStoreManager openStorageManager(int idx) throws BackendException {
return new AstyanaxStoreManager(CassandraStorageSetup.getAstyanaxConfiguration(getClass().getSimpleName()));
}
示例10: openStorageManager
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@Override
public KeyColumnValueStoreManager openStorageManager(int idx) throws BackendException {
return new CassandraThriftStoreManager(CassandraStorageSetup.getCassandraThriftConfiguration(this.getClass().getSimpleName()));
}
示例11: startEmbeddedCassandra
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@BeforeClass
public static void startEmbeddedCassandra() {
CassandraStorageSetup.startCleanEmbedded();
}
示例12: getBaseConfiguration
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@Override
public WriteConfiguration getBaseConfiguration() {
return CassandraStorageSetup.getCassandraThriftGraphConfiguration(getClass().getSimpleName());
}
示例13: openStorageManager
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@Override
public KeyColumnValueStoreManager openStorageManager() throws BackendException {
return new CassandraEmbeddedStoreManager(CassandraStorageSetup.getEmbeddedConfiguration(getClass().getSimpleName()));
}
示例14: getConfiguration
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@Override
public WriteConfiguration getConfiguration() {
return CassandraStorageSetup.getAstyanaxGraphConfiguration(getClass().getSimpleName());
}
示例15: getConfiguration
import com.thinkaurelius.titan.CassandraStorageSetup; //导入依赖的package包/类
@Override
public WriteConfiguration getConfiguration() {
return CassandraStorageSetup.getEmbeddedCassandraPartitionGraphConfiguration(getClass().getSimpleName());
}