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


Java Log类代码示例

本文整理汇总了Java中com.thinkaurelius.titan.diskstorage.log.Log的典型用法代码示例。如果您正苦于以下问题:Java Log类的具体用法?Java Log怎么用?Java Log使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Log类属于com.thinkaurelius.titan.diskstorage.log包,在下文中一共展示了Log类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ManagementSystem

import com.thinkaurelius.titan.diskstorage.log.Log; //导入依赖的package包/类
public ManagementSystem(StandardTitanGraph graph, KCVSConfiguration config, Log sysLog,
                        ManagementLogger mgmtLogger, SchemaCache schemaCache) {
    Preconditions.checkArgument(config != null && graph != null && sysLog != null && mgmtLogger != null);
    this.graph = graph;
    this.baseConfig = config;
    this.sysLog = sysLog;
    this.mgmtLogger = mgmtLogger;
    this.schemaCache = schemaCache;
    this.transactionalConfig = new TransactionalConfiguration(baseConfig);
    this.modifyConfig = new ModifiableConfiguration(ROOT_NS,
            transactionalConfig, BasicConfiguration.Restriction.GLOBAL);
    this.userConfig = new UserModifiableConfiguration(modifyConfig, configVerifier);

    this.updatedTypes = new HashSet<TitanSchemaVertex>();
    this.updatedTypeTriggers = new HashSet<Callable<Boolean>>();
    this.graphShutdownRequired = false;

    this.transaction = (StandardTitanTx) graph.buildTransaction().disableBatchLoading().start();
    this.txStartTime = graph.getConfiguration().getTimestampProvider().getTime();
    this.isOpen = true;
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:22,代码来源:ManagementSystem.java

示例2: openLog

import com.thinkaurelius.titan.diskstorage.log.Log; //导入依赖的package包/类
private Log openLog(String logManagerName, String logName) {
    try {
        ModifiableConfiguration configuration = new ModifiableConfiguration(GraphDatabaseConfiguration.ROOT_NS,config.copy(), BasicConfiguration.Restriction.NONE);
        configuration.set(GraphDatabaseConfiguration.UNIQUE_INSTANCE_ID, "reader");
        configuration.set(GraphDatabaseConfiguration.LOG_READ_INTERVAL, new StandardDuration(500L, TimeUnit.MILLISECONDS), logManagerName);
        if (logStoreManager==null) {
            logStoreManager = Backend.getStorageManager(configuration);
        }
        StoreFeatures f = logStoreManager.getFeatures();
        boolean part = f.isDistributed() && f.isKeyOrdered();
        configuration.set(GraphDatabaseConfiguration.CLUSTER_PARTITION, part);
        assert logStoreManager!=null;
        if (!logManagers.containsKey(logManagerName)) {
            //Open log manager - only supports KCVSLog
            Configuration logConfig = configuration.restrictTo(logManagerName);
            Preconditions.checkArgument(logConfig.get(LOG_BACKEND).equals(LOG_BACKEND.getDefaultValue()));
            logManagers.put(logManagerName,new KCVSLogManager(logStoreManager,logConfig));
        }
        assert logManagers.containsKey(logManagerName);
        return logManagers.get(logManagerName).openLog(logName);
    } catch (BackendException e) {
        throw new TitanException("Could not open log: "+ logName,e);
    }
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:25,代码来源:TitanGraphBaseTest.java

示例3: ManagementSystem

import com.thinkaurelius.titan.diskstorage.log.Log; //导入依赖的package包/类
public ManagementSystem(StandardTitanGraph graph, KCVSConfiguration config, Log sysLog,
                        ManagementLogger mgmtLogger, SchemaCache schemaCache) {
    Preconditions.checkArgument(config!=null && graph!=null && sysLog!=null && mgmtLogger!=null);
    this.graph = graph;
    this.baseConfig = config;
    this.sysLog = sysLog;
    this.mgmtLogger = mgmtLogger;
    this.schemaCache = schemaCache;
    this.transactionalConfig = new TransactionalConfiguration(baseConfig);
    this.modifyConfig = new ModifiableConfiguration(ROOT_NS,
            transactionalConfig, BasicConfiguration.Restriction.GLOBAL);
    this.userConfig = new UserModifiableConfiguration(modifyConfig,configVerifier);

    this.updatedTypes = new HashSet<TitanSchemaVertex>();
    this.updatedTypeTriggers = new HashSet<Callable<Boolean>>();
    this.graphShutdownRequired = false;

    this.transaction = (StandardTitanTx) graph.buildTransaction().disableBatchLoading().start();
    this.txStartTime = graph.getConfiguration().getTimestampProvider().getTime();
    this.isOpen = true;
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:22,代码来源:ManagementSystem.java

示例4: openLog

import com.thinkaurelius.titan.diskstorage.log.Log; //导入依赖的package包/类
private Log openLog(String logManagerName, String logName) {
    try {
        ModifiableConfiguration configuration = new ModifiableConfiguration(GraphDatabaseConfiguration.ROOT_NS,config.copy(), BasicConfiguration.Restriction.NONE);
        configuration.set(GraphDatabaseConfiguration.UNIQUE_INSTANCE_ID, "reader");
        configuration.set(GraphDatabaseConfiguration.LOG_READ_INTERVAL, Duration.ofMillis(500L), logManagerName);
        if (logStoreManager==null) {
            logStoreManager = Backend.getStorageManager(configuration);
        }
        StoreFeatures f = logStoreManager.getFeatures();
        boolean part = f.isDistributed() && f.isKeyOrdered();
        if (part) {
            for (String logname : new String[]{USER_LOG,TRANSACTION_LOG,MANAGEMENT_LOG})
            configuration.set(KCVSLogManager.LOG_MAX_PARTITIONS,8,logname);
        }
        assert logStoreManager!=null;
        if (!logManagers.containsKey(logManagerName)) {
            //Open log manager - only supports KCVSLog
            Configuration logConfig = configuration.restrictTo(logManagerName);
            Preconditions.checkArgument(logConfig.get(LOG_BACKEND).equals(LOG_BACKEND.getDefaultValue()));
            logManagers.put(logManagerName,new KCVSLogManager(logStoreManager,logConfig));
        }
        assert logManagers.containsKey(logManagerName);
        return logManagers.get(logManagerName).openLog(logName);
    } catch (BackendException e) {
        throw new TitanException("Could not open log: "+ logName,e);
    }
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:28,代码来源:TitanGraphBaseTest.java

示例5: getSystemMgmtLog

import com.thinkaurelius.titan.diskstorage.log.Log; //导入依赖的package包/类
public Log getSystemMgmtLog() {
    try {
        return mgmtLogManager.openLog(SYSTEM_MGMT_LOG_NAME);
    } catch (BackendException e) {
        throw new TitanException("Could not re-open management log", e);
    }
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:8,代码来源:Backend.java

示例6: StandardTitanGraph

import com.thinkaurelius.titan.diskstorage.log.Log; //导入依赖的package包/类
public StandardTitanGraph(GraphDatabaseConfiguration configuration) {

        this.config = configuration;
        this.backend = configuration.getBackend();

        this.idAssigner = config.getIDAssigner(backend);
        this.idManager = idAssigner.getIDManager();

        this.serializer = config.getSerializer();
        StoreFeatures storeFeatures = backend.getStoreFeatures();
        this.indexSerializer = new IndexSerializer(configuration.getConfiguration(), this.serializer,
                this.backend.getIndexInformation(), storeFeatures.isDistributed() && storeFeatures.isKeyOrdered());
        this.edgeSerializer = new EdgeSerializer(this.serializer);
        this.vertexExistenceQuery = edgeSerializer.getQuery(BaseKey.VertexExists, Direction.OUT, new EdgeSerializer.TypedInterval[0]).setLimit(1);
        this.queryCache = new RelationQueryCache(this.edgeSerializer);
        this.schemaCache = configuration.getTypeCache(typeCacheRetrieval);
        this.times = configuration.getTimestampProvider();

        isOpen = true;
        txCounter = new AtomicLong(0);
        openTransactions = Collections.newSetFromMap(new ConcurrentHashMap<StandardTitanTx, Boolean>(100, 0.75f, 1));

        //Register instance and ensure uniqueness
        String uniqueInstanceId = configuration.getUniqueGraphId();
        ModifiableConfiguration globalConfig = GraphDatabaseConfiguration.getGlobalSystemConfig(backend);
        if (globalConfig.has(REGISTRATION_TIME, uniqueInstanceId)) {
            throw new TitanException(String.format("A Titan graph with the same instance id [%s] is already open. Might required forced shutdown.", uniqueInstanceId));
        }
        globalConfig.set(REGISTRATION_TIME, times.getTime(), uniqueInstanceId);

        Log mgmtLog = backend.getSystemMgmtLog();
        mgmtLogger = new ManagementLogger(this, mgmtLog, schemaCache, this.times);
        mgmtLog.registerReader(ReadMarker.fromNow(), mgmtLogger);

        shutdownHook = new ShutdownThread(this);
        Runtime.getRuntime().addShutdownHook(shutdownHook);
        log.debug("Installed shutdown hook {}", shutdownHook, new Throwable("Hook creation trace"));
    }
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:39,代码来源:StandardTitanGraph.java

示例7: ManagementLogger

import com.thinkaurelius.titan.diskstorage.log.Log; //导入依赖的package包/类
public ManagementLogger(StandardTitanGraph graph, Log sysLog, SchemaCache schemaCache, TimestampProvider times) {
    this.graph = graph;
    this.schemaCache = schemaCache;
    this.sysLog = sysLog;
    this.times = times;
    Preconditions.checkNotNull(times);
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:8,代码来源:ManagementLogger.java

示例8: getSystemMgmtLog

import com.thinkaurelius.titan.diskstorage.log.Log; //导入依赖的package包/类
public Log getSystemMgmtLog() {
    try {
        return mgmtLogManager.openLog(SYSTEM_MGMT_LOG_NAME);
    } catch (BackendException e) {
        throw new TitanException("Could not re-open management log", e);
    }

}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:9,代码来源:Backend.java

示例9: StandardTitanGraph

import com.thinkaurelius.titan.diskstorage.log.Log; //导入依赖的package包/类
public StandardTitanGraph(GraphDatabaseConfiguration configuration) {
    this.config = configuration;
    this.backend = configuration.getBackend();

    this.idAssigner = config.getIDAssigner(backend);
    this.idManager = idAssigner.getIDManager();

    this.serializer = config.getSerializer();
    StoreFeatures storeFeatures = backend.getStoreFeatures();
    this.indexSerializer = new IndexSerializer(configuration.getConfiguration(), this.serializer,
            this.backend.getIndexInformation(),storeFeatures.isDistributed() && storeFeatures.isKeyOrdered());
    this.edgeSerializer = new EdgeSerializer(this.serializer);
    this.vertexExistenceQuery = edgeSerializer.getQuery(BaseKey.VertexExists, Direction.OUT, new EdgeSerializer.TypedInterval[0]).setLimit(1);
    this.queryCache = new RelationQueryCache(this.edgeSerializer);
    this.schemaCache = configuration.getTypeCache(typeCacheRetrieval);
    this.times = configuration.getTimestampProvider();

    isOpen = true;
    txCounter = new AtomicLong(0);
    openTransactions = Collections.newSetFromMap(new ConcurrentHashMap<StandardTitanTx, Boolean>(100,0.75f,1));

    //Register instance and ensure uniqueness
    String uniqueInstanceId = configuration.getUniqueGraphId();
    ModifiableConfiguration globalConfig = GraphDatabaseConfiguration.getGlobalSystemConfig(backend);
    if (globalConfig.has(REGISTRATION_TIME,uniqueInstanceId)) {
        throw new TitanException(String.format("A Titan graph with the same instance id [%s] is already open. Might required forced shutdown.",uniqueInstanceId));
    }
    globalConfig.set(REGISTRATION_TIME, times.getTime(), uniqueInstanceId);

    Log mgmtLog = backend.getSystemMgmtLog();
    mgmtLogger = new ManagementLogger(this,mgmtLog,schemaCache,this.times);
    mgmtLog.registerReader(ReadMarker.fromNow(),mgmtLogger);

    shutdownHook = new ShutdownThread(this);
    Runtime.getRuntime().addShutdownHook(shutdownHook);
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:37,代码来源:StandardTitanGraph.java

示例10: openUserLog

import com.thinkaurelius.titan.diskstorage.log.Log; //导入依赖的package包/类
public Log openUserLog(String identifier) {
    return openLog(USER_LOG, GraphDatabaseConfiguration.USER_LOG_PREFIX +identifier);
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:4,代码来源:TitanGraphBaseTest.java

示例11: openTxLog

import com.thinkaurelius.titan.diskstorage.log.Log; //导入依赖的package包/类
public Log openTxLog() {
    return openLog(TRANSACTION_LOG, Backend.SYSTEM_TX_LOG_NAME);
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:4,代码来源:TitanGraphBaseTest.java

示例12: getUserLog

import com.thinkaurelius.titan.diskstorage.log.Log; //导入依赖的package包/类
public Log getUserLog(String identifier) throws BackendException {
    return userLogManager.openLog(getUserLogName(identifier));
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:4,代码来源:Backend.java


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