Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 98ebb1f

Browse files
committed
Merge remote-tracking branch 'origin/BLAZEGRAPH_RELEASE_2_0_1'
2 parents 3fa6551 + 217ec27 commit 98ebb1f

80 files changed

Lines changed: 2120 additions & 392 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bigdata-blueprints/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Copyright 2010 by TalkingTrends (Amsterdam, The Netherlands)
2828
<parent>
2929
<groupId>com.blazegraph</groupId>
3030
<artifactId>blazegraph-parent</artifactId>
31-
<version>2.0.0</version>
31+
<version>2.0.1</version>
3232
<relativePath>../pom.xml</relativePath>
3333
</parent>
3434
<groupId>com.blazegraph</groupId>
3535
<artifactId>bigdata-blueprints</artifactId>
36-
<version>2.0.0</version>
36+
<version>2.0.1</version>
3737
<name>Blazegraph Blueprints API</name>
3838
<description>Blazegraph support for Tinkerpop 2.5</description>
3939
<packaging>jar</packaging>

bigdata-blueprints/src/main/java/com/bigdata/blueprints/BigdataGraph.java

Lines changed: 57 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,6 +1489,12 @@ public ICloseableIterator<BigdataGraphAtom> project(final String queryStr,
14891489
result = query.evaluate();
14901490

14911491
} catch (Exception ex) {
1492+
if (queryId != null) {
1493+
/*
1494+
* In case the exception happens during evaluate().
1495+
*/
1496+
finalizeQuery(queryId);
1497+
}
14921498
if (!readFromWriteConnection) {
14931499
cxn.close();
14941500
}
@@ -1657,6 +1663,12 @@ public ICloseableIterator<BigdataBindingSet> select(final String queryStr,
16571663
result = query.evaluate();
16581664

16591665
} catch (Exception ex) {
1666+
if (queryId != null) {
1667+
/*
1668+
* In case the exception happens during evaluate().
1669+
*/
1670+
finalizeQuery(queryId);
1671+
}
16601672
if (!readFromWriteConnection) {
16611673
cxn.close();
16621674
}
@@ -1743,16 +1755,20 @@ public boolean ask(final String queryStr, String externalQueryId)
17431755

17441756
final boolean result = query.evaluate();
17451757

1746-
finalizeQuery(queryId);
1758+
// finalizeQuery(queryId);
17471759

17481760
return result;
17491761

17501762
} finally {
1751-
1763+
if (queryId != null) {
1764+
/*
1765+
* In case the exception happens during evaluate().
1766+
*/
1767+
finalizeQuery(queryId);
1768+
}
17521769
if (!readFromWriteConnection) {
17531770
cxn.close();
17541771
}
1755-
17561772
}
17571773

17581774
}
@@ -1821,20 +1837,13 @@ public ICloseableIterator<BigdataGraphEdit> history(final List<URI> ids)
18211837

18221838
@SuppressWarnings("unchecked")
18231839
public ICloseableIterator<BigdataGraphEdit> history(final List<URI> ids,
1824-
final String extQueryId) throws Exception {
1840+
final String extQueryId) throws Exception {
18251841

1826-
// final List<URI> ids = new LinkedList<URI>();
1827-
// for (Object id : vertexIds) {
1828-
// ids.add(factory.toVertexURI(id));
1829-
// }
1830-
// for (Object id : edgeIds) {
1831-
// ids.add(factory.toEdgeURI(id));
1832-
// }
1842+
final RepositoryConnection cxn = readFromWriteConnection ?
1843+
getWriteConnection() : getReadConnection();
18331844

18341845
final StringBuilder sb = new StringBuilder(HISTORY_TEMPLATE);
18351846

1836-
UUID queryId = null;
1837-
18381847
if (ids.size() > 0) {
18391848
final StringBuilder vc = new StringBuilder();
18401849
vc.append(" values (?s) { \n");
@@ -1852,30 +1861,45 @@ public ICloseableIterator<BigdataGraphEdit> history(final List<URI> ids,
18521861
? queryStr : queryStr.substring(0, SPARQL_LOG_MAX)+" ..."));
18531862
}
18541863

1855-
final RepositoryConnection cxn = readFromWriteConnection ?
1856-
getWriteConnection() : getReadConnection();
1857-
1858-
final TupleQuery query = (TupleQuery)
1859-
cxn.prepareTupleQuery(QueryLanguage.SPARQL, queryStr);
1864+
final TupleQueryResult result;
1865+
UUID queryId = null;
18601866

1861-
if (query instanceof BigdataSailTupleQuery
1862-
&& cxn instanceof BigdataSailRepositoryConnection) {
1863-
1864-
final BigdataSailTupleQuery bdtq = (BigdataSailTupleQuery) query;
1865-
queryId = setupQuery((BigdataSailRepositoryConnection) cxn,
1866-
bdtq.getASTContainer(), QueryType.SELECT,
1867-
extQueryId);
1868-
}
1867+
try {
1868+
1869+
final TupleQuery query = (TupleQuery)
1870+
cxn.prepareTupleQuery(QueryLanguage.SPARQL, queryStr);
1871+
1872+
if (query instanceof BigdataSailTupleQuery
1873+
&& cxn instanceof BigdataSailRepositoryConnection) {
1874+
1875+
final BigdataSailTupleQuery bdtq = (BigdataSailTupleQuery) query;
1876+
queryId = setupQuery((BigdataSailRepositoryConnection) cxn,
1877+
bdtq.getASTContainer(), QueryType.SELECT,
1878+
extQueryId);
1879+
}
1880+
1881+
if (sparqlLog.isTraceEnabled()) {
1882+
if (query instanceof BigdataSailTupleQuery) {
1883+
final BigdataSailTupleQuery bdtq = (BigdataSailTupleQuery) query;
1884+
sparqlLog.trace("optimized AST:\n"+bdtq.optimize());
1885+
}
1886+
}
18691887

1870-
if (sparqlLog.isTraceEnabled()) {
1871-
if (query instanceof BigdataSailTupleQuery) {
1872-
final BigdataSailTupleQuery bdtq = (BigdataSailTupleQuery) query;
1873-
sparqlLog.trace("optimized AST:\n"+bdtq.optimize());
1888+
result = query.evaluate();
1889+
1890+
} catch (Exception ex) {
1891+
if (queryId != null) {
1892+
/*
1893+
* In case the exception happens during evaluate().
1894+
*/
1895+
finalizeQuery(queryId);
1896+
}
1897+
if (!readFromWriteConnection) {
1898+
cxn.close();
18741899
}
1900+
throw ex;
18751901
}
1876-
1877-
final TupleQueryResult result = query.evaluate();
1878-
1902+
18791903
final IStriterator sitr = new Striterator(new WrappedResult<BindingSet>(
18801904
result, readFromWriteConnection ? null : cxn, queryId
18811905
));

bigdata-cache/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Copyright 2010 by TalkingTrends (Amsterdam, The Netherlands)
2828
<parent>
2929
<groupId>com.blazegraph</groupId>
3030
<artifactId>blazegraph-parent</artifactId>
31-
<version>2.0.0</version>
31+
<version>2.0.1</version>
3232
<relativePath>../pom.xml</relativePath>
3333
</parent>
3434
<groupId>com.blazegraph</groupId>
3535
<artifactId>bigdata-cache</artifactId>
36-
<version>2.0.0</version>
36+
<version>2.0.1</version>
3737
<name>Blazegraph Cache</name>
3838
<description>Blazegraph Cache utilities</description>
3939
<packaging>jar</packaging>

bigdata-client/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Copyright 2010 by TalkingTrends (Amsterdam, The Netherlands)
2828
<parent>
2929
<groupId>com.blazegraph</groupId>
3030
<artifactId>blazegraph-parent</artifactId>
31-
<version>2.0.0</version>
31+
<version>2.0.1</version>
3232
<relativePath>../pom.xml</relativePath>
3333
</parent>
3434
<groupId>com.blazegraph</groupId>
3535
<artifactId>bigdata-client</artifactId>
36-
<version>2.0.0</version>
36+
<version>2.0.1</version>
3737
<name>Blazegraph Client API</name>
3838
<description>Blazegraph Client API tools</description>
3939
<build>

bigdata-common-util/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Copyright 2010 by TalkingTrends (Amsterdam, The Netherlands)
2828
<parent>
2929
<groupId>com.blazegraph</groupId>
3030
<artifactId>blazegraph-parent</artifactId>
31-
<version>2.0.0</version>
31+
<version>2.0.1</version>
3232
<relativePath>../pom.xml</relativePath>
3333
</parent>
3434
<groupId>com.blazegraph</groupId>
3535
<artifactId>bigdata-common-util</artifactId>
36-
<version>2.0.0</version>
36+
<version>2.0.1</version>
3737
<name>Blazegraph Common Utilities</name>
3838
<description>Blazegraph utilities common across artifacts</description>
3939
<build>

bigdata-core-test/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ Copyright 2010 by TalkingTrends (Amsterdam, The Netherlands)
2929
<parent>
3030
<groupId>com.blazegraph</groupId>
3131
<artifactId>blazegraph-parent</artifactId>
32-
<version>2.0.0</version>
32+
<version>2.0.1</version>
3333
<relativePath>../pom.xml</relativePath>
3434
</parent>
3535
<groupId>com.blazegraph</groupId>
3636
<artifactId>bigdata-core-test</artifactId>
37-
<version>2.0.0</version>
37+
<version>2.0.1</version>
3838
<packaging>jar</packaging>
3939
<name>Blazegraph Core Tests</name>
4040
<description>Blazegraph Core Platform Test Suites</description>

bigdata-core/bigdata-rdf/src/java/com/bigdata/bop/rdf/join/ChunkedMaterializationIterator.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,13 @@ public IBindingSet[] next() {
130130
if (!hasNext())
131131
throw new NoSuchElementException();
132132

133-
final IBindingSet[] chunk = src.next();
133+
final IBindingSet[] chunkIn = src.next();
134134

135-
ChunkedMaterializationOp.resolveChunk(required, lex, chunk,
136-
materializeInlineIVs);
135+
final IBindingSet[] chunkOut =
136+
ChunkedMaterializationOp.resolveChunk(
137+
required, lex, chunkIn, materializeInlineIVs);
137138

138-
return chunk;
139+
return chunkOut;
139140

140141
}
141142

0 commit comments

Comments
 (0)