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


Java FmtLog.debug方法代码示例

本文整理汇总了Java中org.apache.jena.atlas.logging.FmtLog.debug方法的典型用法代码示例。如果您正苦于以下问题:Java FmtLog.debug方法的具体用法?Java FmtLog.debug怎么用?Java FmtLog.debug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.jena.atlas.logging.FmtLog的用法示例。


在下文中一共展示了FmtLog.debug方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAllocateNodeId

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
@Override
public NodeId getAllocateNodeId(Node node) {
    // XXX Could useful know whether it was find or store
    // find - stop early, store, do all 
    List<NodeTableRemote> tables = distributor.storeAt(node) ;
    NodeId nid = null ; 
    
    for ( NodeTableRemote nt : tables ) {
        NodeId nid1 = nt.getAllocateNodeId(node) ;
        if ( nid == null )
            nid = nid1 ;
        else {
            if ( ! Objects.equals(nid, nid1) )
                FmtLog.warn(log, "Different NodeIds allocated for %s : %s != %s", node, nid, nid1) ;
        }
    }
    
    FmtLog.debug(log, "getAllocateNodeId(%s) -> %s", node, nid) ;
    if ( log.isDebugEnabled() )
        tables.forEach(nt -> FmtLog.debug(log, "  store(%s) @ %s", node, nt)) ;
    return nid ;
}
 
开发者ID:afs,项目名称:lizard,代码行数:23,代码来源:ClusterNodeTable.java

示例2: lookupNodeIds

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
@Override
public List<RDF_Term> lookupNodeIds(long id, long txnId, List<TLZ_NodeId> nodeIds) throws TException {
    FmtLog.debug(log, "[%d] lookupNodeIds : txnId = %d", id, txnId) ;
    checkActive() ;
    return txnAlwaysReturn(txnId, WRITE, ()-> {
        List<RDF_Term> nodes = new ArrayList<>(nodeIds.size()) ;
        for ( TLZ_NodeId nz : nodeIds ) {
            // Local bulk operations?
            NodeId nid = decodeFromTLZ(nz) ;
            Node n = nodeTable.getNodeForNodeId(nid) ;
            nodes.add(encodeToTLZ(n)) ;
            //FmtLog.info(log, "[%d:%d] Batched node alloc : %s => %s", id, txnId, n, nid) ;
        }
        return nodes ;
    }) ;
}
 
开发者ID:afs,项目名称:lizard,代码行数:17,代码来源:THandlerNodeTable.java

示例3: attach

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
public static FileStore attach(Location dirname, String basename) {
    Objects.requireNonNull(dirname, "argument 'dirname' is null");
    Objects.requireNonNull(basename, "argument 'basename' is null");
    if ( basename.equals(tmpBasename) )
        throw new IllegalArgumentException("FileStore.attach: basename is equal to the reserved name '"+tmpBasename+"'") ;
    Path dirPath = IOX.asPath(dirname);
    Path k = key(dirPath, basename);
    if ( areas.containsKey(k) )
        return areas.get(k);
    if ( ! Files.exists(dirPath) || ! Files.isDirectory(dirPath) )
        throw new IllegalArgumentException("FileStore.attach: Path '" + dirPath + "' does not name a directory");

    // Delte any tmp files leaft lying around.
    
    // Find existing files.
    List<Long> indexes = scanForIndex(dirPath, basename);
    long min;
    long max;
    if ( indexes.isEmpty() ) {
        min = DeltaConst.VERSION_INIT;
        // So increment is the next version.
        max = DeltaConst.VERSION_FIRST - 1;
        FmtLog.info(LOG, "FileStore : index [--,%d] %s", max, dirname);
    } else {
        min = indexes.get(0);
        max = indexes.get(indexes.size()-1);
        if ( LOG.isDebugEnabled() ) FmtLog.debug(LOG, "FileStore : index [%d,%d] %s", min, max, dirname);
    }
    FileStore fs = new FileStore(dirPath, basename, indexes, min, max);
    areas.put(k, fs);
    return fs;
}
 
开发者ID:afs,项目名称:rdf-delta,代码行数:33,代码来源:FileStore.java

示例4: start

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
@Override
public void start() {
    if ( super.isRunning() ) {
        FmtLog.error(log, "Already started (%s)", getLabel()) ;
        return ;
    }
    FmtLog.debug(log, "Start: %s", getLabel()) ;
    startProtocol() ;
    super.start() ;
}
 
开发者ID:afs,项目名称:lizard,代码行数:11,代码来源:ThriftClient.java

示例5: startProtocol

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
public void startProtocol() {
    FmtLog.debug(log, "Start thrift: %s", getLabel()) ;
    @SuppressWarnings("resource")
    TTransport transport = new TSocket("localhost", port) ;
    try {
        transport.open() ;
        protocol = ThriftLib.protocol(transport) ;
    }
    catch (TException e) {
        transport.close() ;
        throw new LizardException(e) ;
    }
}
 
开发者ID:afs,项目名称:lizard,代码行数:14,代码来源:ThriftClient.java

示例6: findNodeServices

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
private static Map<Resource, ConfNodeTable> findNodeServices(Model model, ConfCluster confCluster, Map<Resource, DataServer> servers) {
    String qsNodeServices = StrUtils.strjoinNL(prefixes,
                                               "SELECT * {",
                                               " ?svc a :NodeService ;",
                                               "    OPTIONAL { ?svc :name ?name } ",
                                               "    OPTIONAL { ?svc :servers ?sList }",
                                               "}") ;
    Map<Resource, ConfNodeTable> svcs = new LinkedHashMap<>() ;
    for ( QuerySolution row : Q.queryToList(model, qsNodeServices) ) {
        //@@ Check one nodetable.
        Resource svc = row.getResource("svc") ;
        if ( svcs.containsKey(svc) )
            throw new LizardException("Malform declaration for: "+svc) ;
        String name = Q.getStringOrNull(row, "name") ;
        if ( name == null )
            throw new LizardException("No name for NodeService: "+svc) ;
        Resource list = Q.getResourceOrNull(row, "sList") ;
        if ( list == null ) 
            throw new LizardException(name+" : No shard list for NodeService") ;
        List<Resource> sList = Q.listResources(list) ;

        FmtLog.debug(logConf, "Node service <%s>:%s", svc.getURI(), name) ;

        int N = sList.size() ;
        ConfNodeTable confNode = new ConfNodeTable(1, N) ;
        // Process servers.
        AtomicInteger integer = new AtomicInteger(0) ;
        sList.forEach(svr -> {
            DataServer ds = servers.get(svr) ;
            if ( ds == null )
                throw new LzConfigurationException("No server found: "+svr) ;
            int i = integer.incrementAndGet() ;
            ConfNodeTableElement nt  = new ConfNodeTableElement(ds.name, ds.data, confNode, ds.addr) ;
            confCluster.eltsNodeTable.add(nt) ;
        });
        confCluster.dataset.nodeTable = confNode ;
        svcs.put(svc, confNode) ;
    }
    return svcs ; 
}
 
开发者ID:afs,项目名称:lizard,代码行数:41,代码来源:LzConfParserRDF.java

示例7: idxDeleteAll

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
@Override
public void idxDeleteAll(long id, long txnId, TLZ_ShardIndex shard, List<TLZ_TupleNodeId> tuples) throws TException {
    FmtLog.debug(log, "[%d] idxDeleteBulk : txnId = %d", id, txnId) ;
    txnAlways(txnId, WRITE, () -> {
        for ( TLZ_TupleNodeId tuple : tuples ) {
            Tuple<NodeId> tuple2 = TLZlib.build(tuple) ;
            FmtLog.info(log, "[%d:%d] delete %s %s", id, txnId, index.getName(), tuple2) ;
            index.delete(tuple2) ;
        }
    }) ;
}
 
开发者ID:afs,项目名称:lizard,代码行数:12,代码来源:THandlerTupleIndex.java

示例8: start

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
@Override
public void start() {
    FmtLog.info(log, "Start (%s:%d)", client.getRemoteHost(), client.getRemotePort()) ;
    
    if ( client.isRunning() ) {
        FmtLog.debug(log, "Already started (%s:%d)", client.getRemoteHost(), client.getRemotePort()) ;
        return ;
    }
    FmtLog.debug(log, "Start: %s", getLabel()) ;
    client.start() ;
    // Delay until starting (client.protocol not valid until then).
    super.setRPC(new TLZ_Index.Client(client.protocol())) ;
    super.start() ; 
    connState = ConnState.OK ;
}
 
开发者ID:afs,项目名称:lizard,代码行数:16,代码来源:TClientIndex.java

示例9: performAdd

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
@Override
protected void performAdd(Tuple<NodeId> tuple) {
    FmtLog.debug(log, "Add - %s", tuple);
    List<TupleIndexRemote> places = distributor.storeAt(tuple) ;
    // ----
    for ( TupleIndexRemote idx : places ) {
        FmtLog.debug(log, "  Add @%s", idx.getLabel()) ;
        idx.add(tuple) ;
    }
}
 
开发者ID:afs,项目名称:lizard,代码行数:11,代码来源:ClusterTupleIndex.java

示例10: addAll

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
@Override
public void addAll(Collection<Tuple<NodeId>> tuples) {
    // XXX Sharding.
    Collection<TupleIndexRemote> places = distributor.allStore() ;
    // ----
    for ( TupleIndexRemote idx : places ) {
        FmtLog.debug(log, "  allAll @%s", idx.getLabel()) ;
        idx.addAll(tuples) ;
    }
}
 
开发者ID:afs,项目名称:lizard,代码行数:11,代码来源:ClusterTupleIndex.java

示例11: performDelete

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
@Override
protected void performDelete(Tuple<NodeId> tuple) {
    FmtLog.debug(log, "Del - %s", tuple) ;
    List<TupleIndexRemote> places = distributor.storeAt(tuple) ;
    // ----
    for ( TupleIndexRemote idx : places ) {
        FmtLog.debug(log, "  Del @%s", idx.getLabel()) ;
        idx.delete(tuple) ;
    }
}
 
开发者ID:afs,项目名称:lizard,代码行数:11,代码来源:ClusterTupleIndex.java

示例12: deleteAll

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
@Override
public void deleteAll(Collection<Tuple<NodeId>> tuples) {
    // XXX Sharding.
    Collection<TupleIndexRemote> places = distributor.allStore() ;
    // ----
    for ( TupleIndexRemote idx : places ) {
        FmtLog.debug(log, "  deleteAll @%s", idx.getLabel()) ;
        idx.deleteAll(tuples) ;
    }
}
 
开发者ID:afs,项目名称:lizard,代码行数:11,代码来源:ClusterTupleIndex.java

示例13: getNodeIdForNode

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
@Override
public NodeId getNodeIdForNode(Node node) {
    List<NodeTableRemote> tables = distributor.findAt(node) ;
    for ( NodeTableRemote nt : tables ) {
        NodeId nid = nt.getNodeIdForNode(node) ;
        if ( nid != null ) {
            FmtLog.debug(log, "getNodeIdForNode(%s) -> %s", node, nid) ;
            return nid ;
        }
    }
    FmtLog.debug(log, "getAllocateNodeId(%s) -> no found", node) ;
    return NodeId.NodeDoesNotExist ;
}
 
开发者ID:afs,项目名称:lizard,代码行数:14,代码来源:ClusterNodeTable.java

示例14: start

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
@Override
public void start() {
    client.start() ;
    FmtLog.debug(log, "Start: %s", getLabel()) ;
    // Delay until starting (client.protocol not valid until then).
    super.setRPC(new TLZ_NodeTable.Client(client.protocol())) ;
    super.start() ;
    connState = ConnState.OK ;
}
 
开发者ID:afs,项目名称:lizard,代码行数:10,代码来源:TClientNode.java

示例15: hasFinished

import org.apache.jena.atlas.logging.FmtLog; //导入方法依赖的package包/类
@Override
protected void hasFinished() {
    if ( Quack.JOIN_EXPLAIN ) {
        FmtLog.debug(Quack.joinStatsLog,
                     "SubstitutionJoin: LHS=%d Results=%d",
                     s_countLHS, s_countResults
                     ) ;
    }
}
 
开发者ID:afs,项目名称:quack,代码行数:10,代码来源:SubstitutionJoin.java


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