本文整理汇总了Java中com.thinkaurelius.titan.graphdb.database.idassigner.placement.SimpleBulkPlacementStrategy类的典型用法代码示例。如果您正苦于以下问题:Java SimpleBulkPlacementStrategy类的具体用法?Java SimpleBulkPlacementStrategy怎么用?Java SimpleBulkPlacementStrategy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SimpleBulkPlacementStrategy类属于com.thinkaurelius.titan.graphdb.database.idassigner.placement包,在下文中一共展示了SimpleBulkPlacementStrategy类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getConfiguration
import com.thinkaurelius.titan.graphdb.database.idassigner.placement.SimpleBulkPlacementStrategy; //导入依赖的package包/类
@Override
public WriteConfiguration getConfiguration() {
WriteConfiguration config = getBaseConfiguration();
ModifiableConfiguration mconf = new ModifiableConfiguration(GraphDatabaseConfiguration.ROOT_NS,config, BasicConfiguration.Restriction.NONE);
// Let GraphDatabaseConfiguration's config freezer set CLUSTER_PARTITION
//mconf.set(GraphDatabaseConfiguration.CLUSTER_PARTITION,true);
mconf.set(GraphDatabaseConfiguration.CLUSTER_MAX_PARTITIONS,numPartitions);
//uses SimpleBulkPlacementStrategy by default
mconf.set(SimpleBulkPlacementStrategy.CONCURRENT_PARTITIONS,3*numPartitions);
return config;
}
示例2: getHBaseConfiguration
import com.thinkaurelius.titan.graphdb.database.idassigner.placement.SimpleBulkPlacementStrategy; //导入依赖的package包/类
public static ModifiableConfiguration getHBaseConfiguration(String tableName) {
ModifiableConfiguration config = GraphDatabaseConfiguration.buildGraphConfiguration();
config.set(GraphDatabaseConfiguration.STORAGE_BACKEND, "hbase");
if (!StringUtils.isEmpty(tableName)) config.set(HBaseStoreManager.HBASE_TABLE,tableName);
config.set(GraphDatabaseConfiguration.TIMESTAMP_PROVIDER, HBaseStoreManager.PREFERRED_TIMESTAMPS);
config.set(SimpleBulkPlacementStrategy.CONCURRENT_PARTITIONS, 1);
// config.set(GraphDatabaseConfiguration.STORAGE_NS.getName()+"."+HBaseStoreManager.HBASE_CONFIGURATION_NAMESPACE+
// ".hbase.zookeeper.quorum","localhost");
// config.set(GraphDatabaseConfiguration.STORAGE_NS.getName()+"."+HBaseStoreManager.HBASE_CONFIGURATION_NAMESPACE+
// "hbase.zookeeper.property.clientPort",2181);
return config;
}
示例3: getConfiguration
import com.thinkaurelius.titan.graphdb.database.idassigner.placement.SimpleBulkPlacementStrategy; //导入依赖的package包/类
@Override
public WriteConfiguration getConfiguration() {
WriteConfiguration config = getBaseConfiguration();
ModifiableConfiguration mconf = new ModifiableConfiguration(GraphDatabaseConfiguration.ROOT_NS,config, BasicConfiguration.Restriction.NONE);
// Let GraphDatabaseConfiguration's config freezer set CLUSTER_PARTITION
//mconf.set(GraphDatabaseConfiguration.CLUSTER_PARTITION,true);
mconf.set(GraphDatabaseConfiguration.CLUSTER_MAX_PARTITIONS,numPartitions);
//uses SimpleBulkPlacementStrategy by default
mconf.set(SimpleBulkPlacementStrategy.CONCURRENT_PARTITIONS,16);
return config;
}
示例4: getHBaseConfiguration
import com.thinkaurelius.titan.graphdb.database.idassigner.placement.SimpleBulkPlacementStrategy; //导入依赖的package包/类
public static ModifiableConfiguration getHBaseConfiguration() {
ModifiableConfiguration config = GraphDatabaseConfiguration.buildConfiguration();
config.set(GraphDatabaseConfiguration.STORAGE_BACKEND, "hbase");
config.set(GraphDatabaseConfiguration.CLUSTER_PARTITION, true);
config.set(GraphDatabaseConfiguration.TIMESTAMP_PROVIDER, HBaseStoreManager.PREFERRED_TIMESTAMPS);
config.set(SimpleBulkPlacementStrategy.CONCURRENT_PARTITIONS, 1);
// config.set(GraphDatabaseConfiguration.STORAGE_NS.getName()+"."+HBaseStoreManager.HBASE_CONFIGURATION_NAMESPACE+
// ".hbase.zookeeper.quorum","localhost");
// config.set(GraphDatabaseConfiguration.STORAGE_NS.getName()+"."+HBaseStoreManager.HBASE_CONFIGURATION_NAMESPACE+
// "hbase.zookeeper.property.clientPort",2181);
return config;
}