@Override final public long getStatementCount() { return getStatementCount(null/* c */, false/* exact */); }
@Override final public long getStatementCount(final boolean exact) { return getStatementCount(null/*c*/, exact); }
@Override final public long getStatementCount(final Resource c) { return getStatementCount(c, false/* exact */); }
@Override final public long getStatementCount() { return getStatementCount(null/* c */, false/* exact */); }
@Override final public long getStatementCount(final boolean exact) { return getStatementCount(null/*c*/, exact); }
@Override final public long getStatementCount(final Resource c) { return getStatementCount(c, false/* exact */); }
private static PipelineOp convertDropEntailments(final PipelineOp left, final AST2BOpUpdateContext context) throws SailException { long stmtCount = 0; if (log.isDebugEnabled()) { stmtCount = context.conn.getSailConnection().getTripleStore().getStatementCount(true); log.info("begin drop entailments"); } context.conn.getSailConnection().removeAllEntailments(); if (log.isDebugEnabled()) { long removedCount = stmtCount - context.conn.getSailConnection().getTripleStore().getStatementCount(true); log.debug("Removed statements = " + removedCount); } return left; }
private static PipelineOp convertCreateEntailments(PipelineOp left, AST2BOpUpdateContext context) throws SailException { long stmtCount = 0; if (log.isDebugEnabled()) { stmtCount = context.conn.getSailConnection().getTripleStore().getStatementCount(true); log.info("begin compute closure"); } context.conn.getSailConnection().computeClosure(); if (log.isDebugEnabled()) { long inferredCount = context.conn.getSailConnection().getTripleStore().getStatementCount(true) - stmtCount; log.debug("Inferred statements = " + inferredCount); } return left; }
private static PipelineOp convertDropEntailments(final PipelineOp left, final AST2BOpUpdateContext context) throws SailException { long stmtCount = 0; if (log.isDebugEnabled()) { stmtCount = context.conn.getSailConnection().getTripleStore().getStatementCount(true); log.info("begin drop entailments"); } context.conn.getSailConnection().removeAllEntailments(); if (log.isDebugEnabled()) { long removedCount = stmtCount - context.conn.getSailConnection().getTripleStore().getStatementCount(true); log.debug("Removed statements = " + removedCount); } return left; }
private static PipelineOp convertCreateEntailments(PipelineOp left, AST2BOpUpdateContext context) throws SailException { long stmtCount = 0; if (log.isDebugEnabled()) { stmtCount = context.conn.getSailConnection().getTripleStore().getStatementCount(true); log.info("begin compute closure"); } context.conn.getSailConnection().computeClosure(); if (log.isDebugEnabled()) { long inferredCount = context.conn.getSailConnection().getTripleStore().getStatementCount(true) - stmtCount; log.debug("Inferred statements = " + inferredCount); } return left; }
/** * Report totals. * <p> * Note: these totals reflect the actual state of the database, not just * the #of triples written by this client. Therefore if there are * concurrent writers then the apparent TPS here will be higher than was * reported by the counters for just this client -- all writers on the * database will have been attributed to just this client. */ public String reportTotals() { // total run time. final long elapsed = elapsed(); final long nterms = db.getTermCount(); final long nstmts = db.getStatementCount(); final double tps = (long) (((double) nstmts) / ((double) elapsed) * 1000d); return "Database: #terms=" + nterms + ", #stmts=" + nstmts + ", rate=" + tps + " in " + elapsed + " ms."; }
/** * Report totals. * <p> * Note: these totals reflect the actual state of the database, not just * the #of triples written by this client. Therefore if there are * concurrent writers then the apparent TPS here will be higher than was * reported by the counters for just this client -- all writers on the * database will have been attributed to just this client. */ public String reportTotals() { // total run time. final long elapsed = elapsed(); final long nterms = db.getTermCount(); final long nstmts = db.getStatementCount(); final double tps = (long) (((double) nstmts) / ((double) elapsed) * 1000d); return "Database: #terms=" + nterms + ", #stmts=" + nstmts + ", rate=" + tps + " in " + elapsed + " ms."; }
@Override public void loadFiles() throws IOException { final BigdataOptionData opt = getOptionData(); final Journal jnl = opt.jnl; final String namespace = opt.namespace; final String[] loadSet = opt.loadSet.toArray(new String[0]); // Load data using the unisolated view. final AbstractTripleStore kb = (AbstractTripleStore) jnl .getResourceLocator().locate(namespace, ITx.UNISOLATED); if (opt.newKB && loadSet.length > 0) { final BigdataSail sail = new BigdataSail(kb); try { try { sail.initialize(); loadFiles(sail, loadSet); } finally { if (sail.isOpen()) sail.shutDown(); } } catch (Exception ex) { throw new RuntimeException(ex); } } // total #of edges in that graph. opt.nedges = kb.getStatementCount(); }
@Override public void loadFiles() throws IOException { final BigdataOptionData opt = getOptionData(); final Journal jnl = opt.jnl; final String namespace = opt.namespace; final String[] loadSet = opt.loadSet.toArray(new String[0]); // Load data using the unisolated view. final AbstractTripleStore kb = (AbstractTripleStore) jnl .getResourceLocator().locate(namespace, ITx.UNISOLATED); if (opt.newKB && loadSet.length > 0) { final BigdataSail sail = new BigdataSail(kb); try { try { sail.initialize(); loadFiles(sail, loadSet); } finally { if (sail.isOpen()) sail.shutDown(); } } catch (Exception ex) { throw new RuntimeException(ex); } } // total #of edges in that graph. opt.nedges = kb.getStatementCount(); }
assertEquals(1,store.getStatementCount()); assertFalse(store.hasStatement(U, rdfType, rdfsResource)); assertTrue(store.hasStatement(V, rdfType, rdfsResource)); assertEquals(2,store.getStatementCount());
assertEquals(1,store.getStatementCount()); assertEquals(2,store.getStatementCount());
assertEquals(2,store.getStatementCount()); assertTrue(store.hasStatement(rdfType, rdfsRange, rdfsClass)); assertTrue(store.hasStatement(B, rdfType, rdfsClass)); assertEquals(3,store.getStatementCount());
assertEquals(1,store.getStatementCount()); assertFalse(store.hasStatement(U, rdfType, rdfsResource)); assertTrue(store.hasStatement(V, rdfType, rdfsResource)); assertEquals(2,store.getStatementCount());
assertEquals(1,store.getStatementCount()); assertEquals(2,store.getStatementCount());
assertEquals(2,store.getStatementCount()); assertTrue(store.hasStatement(rdfType, rdfsRange, rdfsClass)); assertTrue(store.hasStatement(B, rdfType, rdfsClass)); assertEquals(3,store.getStatementCount());