public void testGetRequestTimeout1() throws Exception { final String httpHeaderBigdataMaxQueryMillis = "1"; final String maxQuryTimeMillis = "1000"; final String timeout = "1"; long configTimeout = 1000; final HttpServletRequest req = new MockRequest(// httpHeaderBigdataMaxQueryMillis, maxQuryTimeMillis, timeout); final long actual = BigdataRDFContext.getQueryTimeout(req, configTimeout); final long expected = Long.parseLong(httpHeaderBigdataMaxQueryMillis); assertEquals(expected , actual); }
/** * Return a list of the namespaces for the {@link AbstractTripleStore}s * registered against the bigdata instance. * * @see <a href="http://trac.blazegraph.com/ticket/867"> NSS concurrency * problem with list namespaces and create namespace </a> */ /*package*/ List<String> getNamespaces(final long timestamp) { final long tx = newTx(timestamp); try { return getNamespacesTx(tx); } finally { abortTx(tx); } }
/** * Write the header of the SPARQL UPDATE response. * * @return The body. * * @throws IOException */ private XMLBuilder.Node writeSparqlUpdateResponseHeader() throws IOException { XMLBuilder.Node current = doc.root("html"); addHtmlHeader(current, charset.name()); return current; }
BigdataRDFContext.addHtmlHeader(current, charset); .text("" +getBigdataRDFContext().getQueryIdFactory().get()) .close() .close(); .text("" + getBigdataRDFContext().getQueries().size()).close() .close(); .getNamespaces(getTimestamp(req)); if (getBigdataRDFContext().getSampleTask() != null) { getBigdataRDFContext().getSampleTask() .getCounters());
final String baseURI = BigdataRDFContext.getBaseURI(req, resp); final AbstractQueryTask queryTask = context.getQueryTask( conn, namespace, timestamp, queryStr, baseURI, astContainer, includeInferred, bindings,
final long queryTimeoutMillis = getQueryTimeout(req, getConfig().queryTimeout);
final long tx = getBigdataRDFContext().newTx(getTimestamp(req)); .getTripleStore(getNamespace(req), tx); .getConfig(); getBigdataRDFContext().abortTx(tx);
getBigdataRDFContext().getConfig().describeEachNamedGraph; final long tx = getBigdataRDFContext().newTx(timestamp); final String namespace = getBigdataRDFContext().getConfig().namespace; .getNamespacesTx(tx); getBigdataRDFContext().abortTx(tx);
final String namespace = rdfContext.getConfig().namespace; .getIndexManager().getResourceLocator() .locate(namespace, timestamp);
context.addTask(task, ft); context.removeTask(task.uuid);
static final SparqlEndpointConfig getConfig( final ServletContext servletContext) { return getBigdataRDFContext(servletContext).getConfig(); }
final String stylesheet = getEffectiveStringValue( req.getParameter(XSL_STYLESHEET), DEFAULT_XSL_STYLESHEET);
readOnly, queryTimeout); rdfContext = new BigdataRDFContext(config, indexManager);
this.explain = req.getParameter(EXPLAIN) != null; this.explainDetails = explain && isExplainDetails(req); this.analytic = getEffectiveBooleanValue( req.getParameter(ANALYTIC), QueryHints.DEFAULT_ANALYTIC); this.rto = getEffectiveBooleanValue(req.getParameter(RTO), QueryHints.DEFAULT_OPTIMIZER .equals(QueryOptimizerEnum.Runtime)); this.xhtml = getEffectiveBooleanValue(req.getParameter(XHTML), false); this.monitor = getEffectiveBooleanValue(req.getParameter(MONITOR), false); this.os = os; this.explain = req.getParameter(EXPLAIN) != null; this.explainDetails = explain && isExplainDetails(req); this.analytic = getEffectiveBooleanValue( req.getParameter(ANALYTIC), QueryHints.DEFAULT_ANALYTIC); this.rto = getEffectiveBooleanValue(req.getParameter(RTO), QueryHints.DEFAULT_OPTIMIZER .equals(QueryOptimizerEnum.Runtime)); this.xhtml = getEffectiveBooleanValue(req.getParameter(XHTML), false); this.monitor = getEffectiveBooleanValue(req.getParameter(MONITOR), false); this.os = os;
BigdataRDFContext.addHtmlHeader(current, charset); .text("" +getBigdataRDFContext().getQueryIdFactory().get()) .close() .close(); .text("" + getBigdataRDFContext().getQueries().size()).close() .close(); .getNamespaces(getTimestamp(req)); if (getBigdataRDFContext().getSampleTask() != null) { getBigdataRDFContext().getSampleTask() .getCounters());
final String baseURI = BigdataRDFContext.getBaseURI(req, resp); final AbstractQueryTask queryTask = context.getQueryTask( conn, namespace, timestamp, queryStr, baseURI, astContainer, includeInferred, bindings,
final long queryTimeoutMillis = getQueryTimeout(req, getConfig().queryTimeout);
final long tx = getBigdataRDFContext().newTx(getTimestamp(req)); .getTripleStore(getNamespace(req), tx); .getConfig(); getBigdataRDFContext().abortTx(tx);
getBigdataRDFContext().getConfig().describeEachNamedGraph; final long tx = getBigdataRDFContext().newTx(timestamp); final String namespace = getBigdataRDFContext().getConfig().namespace; .getNamespacesTx(tx); getBigdataRDFContext().abortTx(tx);
final String namespace = rdfContext.getConfig().namespace; .getIndexManager().getResourceLocator() .locate(namespace, timestamp);