当前位置: 首页>>代码示例>>Java>>正文


Java ConfigurationUtil类代码示例

本文整理汇总了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});
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:8,代码来源:Backend.java

示例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();
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:39,代码来源:GraphDatabaseConfiguration.java

示例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);
    });
}
 
开发者ID:graben1437,项目名称:titan1.0.1.kafka,代码行数:11,代码来源:GiraphInputFormat.java

示例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();
}
 
开发者ID:graben1437,项目名称:titan1.0.1.kafka,代码行数:38,代码来源:GraphDatabaseConfiguration.java

示例5: getGraphSetup

import com.thinkaurelius.titan.util.system.ConfigurationUtil; //导入依赖的package包/类
public TitanHadoopSetup getGraphSetup() {
    return ConfigurationUtil.instantiate(className, new Object[]{ apacheConf }, new Class[]{ Configuration.class });
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:4,代码来源:TitanInputFormat.java

示例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);
    });
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:16,代码来源:GiraphInputFormat.java


注:本文中的com.thinkaurelius.titan.util.system.ConfigurationUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。