本文整理汇总了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 ;
}
示例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 ;
}) ;
}
示例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;
}
示例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() ;
}
示例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) ;
}
}
示例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 ;
}
示例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) ;
}
}) ;
}
示例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 ;
}
示例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) ;
}
}
示例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) ;
}
}
示例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) ;
}
}
示例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) ;
}
}
示例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 ;
}
示例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 ;
}
示例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
) ;
}
}