本文整理匯總了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;
}