本文整理汇总了Java中com.thinkaurelius.titan.util.system.ConfigurationUtil类的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationUtil类的具体用法?Java ConfigurationUtil怎么用?Java ConfigurationUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConfigurationUtil类属于com.thinkaurelius.titan.util.system包,在下文中一共展示了ConfigurationUtil类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getImplementationClass
import com.thinkaurelius.titan.util.system.ConfigurationUtil; //导入依赖的package包/类
public final static <T> T getImplementationClass(Configuration config, String clazzname, Map<String, String> registeredImpls) {
if (registeredImpls.containsKey(clazzname.toLowerCase())) {
clazzname = registeredImpls.get(clazzname.toLowerCase());
}
return ConfigurationUtil.instantiate(clazzname, new Object[]{config}, new Class[]{Configuration.class});
}
示例2: preLoadConfiguration
import com.thinkaurelius.titan.util.system.ConfigurationUtil; //导入依赖的package包/类
private void preLoadConfiguration() {
readOnly = configuration.get(STORAGE_READONLY);
flushIDs = configuration.get(IDS_FLUSH);
forceIndexUsage = configuration.get(FORCE_INDEX_USAGE);
batchLoading = configuration.get(STORAGE_BATCH);
String autoTypeMakerName = configuration.get(AUTO_TYPE);
if (preregisteredAutoType.containsKey(autoTypeMakerName))
defaultSchemaMaker = preregisteredAutoType.get(autoTypeMakerName);
else defaultSchemaMaker = ConfigurationUtil.instantiate(autoTypeMakerName);
//Disable auto-type making when batch-loading is enabled since that may overwrite types without warning
if (batchLoading) defaultSchemaMaker = DisableDefaultSchemaMaker.INSTANCE;
txVertexCacheSize = configuration.get(TX_CACHE_SIZE);
//Check for explicit dirty vertex cache size first, then fall back on batch-loading-dependent default
if (configuration.has(TX_DIRTY_SIZE)) {
txDirtyVertexSize = configuration.get(TX_DIRTY_SIZE);
} else {
txDirtyVertexSize = batchLoading ?
TX_DIRTY_SIZE_DEFAULT_WITH_BATCH :
TX_DIRTY_SIZE_DEFAULT_WITHOUT_BATCH;
}
propertyPrefetching = configuration.get(PROPERTY_PREFETCHING);
useMultiQuery = configuration.get(USE_MULTIQUERY);
adjustQueryLimit = configuration.get(ADJUST_LIMIT);
allowVertexIdSetting = configuration.get(ALLOW_SETTING_VERTEX_ID);
logTransactions = configuration.get(SYSTEM_LOG_TRANSACTIONS);
// DAVID KAFKA PRODUCER
logAllTransactions = configuration.get(REPORT_ALL_TX);
// DAVID KAFKA PRODUCER
allTransactionLogName = configuration.get(TX_TRANS_LOG_NAME);
unknownIndexKeyName = configuration.get(IGNORE_UNKNOWN_INDEX_FIELD) ? UKNOWN_FIELD_NAME : null;
configureMetrics();
}
示例3: setConf
import com.thinkaurelius.titan.util.system.ConfigurationUtil; //导入依赖的package包/类
@Override
public void setConf(Configuration conf) {
((Configurable)inputFormat).setConf(conf);
refCounter = new RefCountedCloseable<>(() -> {
final String titanVersion = "current";
String className = SETUP_PACKAGE_PREFIX + titanVersion + SETUP_CLASS_NAME;
TitanHadoopSetup ts = ConfigurationUtil.instantiate(className, new Object[]{conf}, new Class[]{Configuration.class});
return new TitanVertexDeserializer(ts);
});
}
示例4: preLoadConfiguration
import com.thinkaurelius.titan.util.system.ConfigurationUtil; //导入依赖的package包/类
private void preLoadConfiguration() {
readOnly = configuration.get(STORAGE_READONLY);
flushIDs = configuration.get(IDS_FLUSH);
forceIndexUsage = configuration.get(FORCE_INDEX_USAGE);
batchLoading = configuration.get(STORAGE_BATCH);
String autoTypeMakerName = configuration.get(AUTO_TYPE);
if (preregisteredAutoType.containsKey(autoTypeMakerName))
defaultSchemaMaker = preregisteredAutoType.get(autoTypeMakerName);
else defaultSchemaMaker = ConfigurationUtil.instantiate(autoTypeMakerName);
//Disable auto-type making when batch-loading is enabled since that may overwrite types without warning
if (batchLoading) defaultSchemaMaker = DisableDefaultSchemaMaker.INSTANCE;
txVertexCacheSize = configuration.get(TX_CACHE_SIZE);
//Check for explicit dirty vertex cache size first, then fall back on batch-loading-dependent default
if (configuration.has(TX_DIRTY_SIZE)) {
txDirtyVertexSize = configuration.get(TX_DIRTY_SIZE);
} else {
txDirtyVertexSize = batchLoading ?
TX_DIRTY_SIZE_DEFAULT_WITH_BATCH :
TX_DIRTY_SIZE_DEFAULT_WITHOUT_BATCH;
}
propertyPrefetching = configuration.get(PROPERTY_PREFETCHING);
useMultiQuery = configuration.get(USE_MULTIQUERY);
adjustQueryLimit = configuration.get(ADJUST_LIMIT);
allowVertexIdSetting = configuration.get(ALLOW_SETTING_VERTEX_ID);
logTransactions = configuration.get(SYSTEM_LOG_TRANSACTIONS);
// KAFKA PRODUCER
logAllTransactions = configuration.get(REPORT_ALL_TX);
// KAFKA PRODUCER
allTransactionLogName = configuration.get(TX_TRANS_LOG_NAME);
unknownIndexKeyName = configuration.get(IGNORE_UNKNOWN_INDEX_FIELD) ? UKNOWN_FIELD_NAME : null;
configureMetrics();
}
示例5: getGraphSetup
import com.thinkaurelius.titan.util.system.ConfigurationUtil; //导入依赖的package包/类
public TitanHadoopSetup getGraphSetup() {
return ConfigurationUtil.instantiate(className, new Object[]{ apacheConf }, new Class[]{ Configuration.class });
}
示例6: setConf
import com.thinkaurelius.titan.util.system.ConfigurationUtil; //导入依赖的package包/类
public void setConf(Configuration conf, Boolean reset) {
((Configurable)inputFormat).setConf(conf);
if(refCounter != null && !reset) return;
refCounter = new RefCountedCloseable<>(() -> {
final String titanVersion = "current";
String className = SETUP_PACKAGE_PREFIX + titanVersion + SETUP_CLASS_NAME;
TitanHadoopSetup ts = ConfigurationUtil.instantiate(className, new Object[]{conf}, new Class[]{Configuration.class});
return new TitanVertexDeserializer(ts);
});
}