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

Commit 53ffd27

Browse files
committed
Merge pull request #10 from blazegraph/BLAZEGRAPH_RELEASE_2_1_1
Blazegraph release 2 1 1
2 parents c98a571 + 90d9e82 commit 53ffd27

287 files changed

Lines changed: 35026 additions & 1017 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.1.0</version>
31+
<version>2.1.1</version>
3232
<relativePath>../pom.xml</relativePath>
3333
</parent>
3434
<groupId>com.blazegraph</groupId>
3535
<artifactId>bigdata-blueprints</artifactId>
36-
<version>2.1.0</version>
36+
<version>2.1.1</version>
3737
<name>Blazegraph Blueprints API</name>
3838
<description>Blazegraph support for Tinkerpop 2.5</description>
3939
<packaging>jar</packaging>

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.1.0</version>
31+
<version>2.1.1</version>
3232
<relativePath>../pom.xml</relativePath>
3333
</parent>
3434
<groupId>com.blazegraph</groupId>
3535
<artifactId>bigdata-cache</artifactId>
36-
<version>2.1.0</version>
36+
<version>2.1.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.1.0</version>
31+
<version>2.1.1</version>
3232
<relativePath>../pom.xml</relativePath>
3333
</parent>
3434
<groupId>com.blazegraph</groupId>
3535
<artifactId>bigdata-client</artifactId>
36-
<version>2.1.0</version>
36+
<version>2.1.1</version>
3737
<name>Blazegraph Client API</name>
3838
<description>Blazegraph Client API tools</description>
3939
<build>

bigdata-client/src/main/java/com/bigdata/rdf/sail/webapp/client/AutoCloseHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected void doStop() throws Exception {
9696
@Override
9797
public void close() throws Exception {
9898

99-
if (isStopped())
99+
if (isStopping() || isStopped())
100100
return;
101101

102102
stop();

bigdata-client/src/main/java/com/bigdata/rdf/sail/webapp/client/RemoteRepositoryManager.java

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public class RemoteRepositoryManager extends RemoteRepositoryBase implements Aut
160160
private final RemoteTransactionManager transactionManager;
161161

162162
/**
163-
* <code>true</code> iff open.
163+
* <code>true</code> iff already closed.
164164
*/
165165
private volatile boolean m_closed = false;
166166

@@ -367,10 +367,12 @@ public RemoteRepositoryManager(final String serviceURL, final boolean useLBS) {
367367
* trailing "/"). <code>/sparql</code> will be appended to this
368368
* path to obtain the SPARQL end point for the default data set.
369369
* @param httpClient
370-
* If the client implements {@link AutoCloseable} then it will be
371-
* closed by {@link #close()} (optional). When not present, an
372-
* {@link HttpClient} will be allocated and scoped to this
373-
* {@link RemoteRepositoryManager} instance.
370+
* The client is managed externally and, in particular,
371+
* may be shared, so we don't close it in {@link #close()}.
372+
* When not present (null), an {@link HttpClient} will be
373+
* allocated and scoped to this
374+
* {@link RemoteRepositoryManager} instance, and closed
375+
* in {@link #close()}.
374376
* @param executor
375377
* An executor used to service http client requests. (optional).
376378
* When not present, an {@link Executor} will be allocated and
@@ -407,10 +409,12 @@ public RemoteRepositoryManager(final String serviceURL, final HttpClient httpCli
407409
* specify <code>true</code>. When <code>false</code>, the REST
408410
* API methods will NOT use the load balancer aware requestURLs.
409411
* @param httpClient
410-
* If the client implements {@link AutoCloseable} then it will be
411-
* closed by {@link #close()} (optional). When not present, an
412-
* {@link HttpClient} will be allocated and scoped to this
413-
* {@link RemoteRepositoryManager} instance.
412+
* The client is managed externally and, in particular,
413+
* may be shared, so we don't close it in {@link #close()}.
414+
* When not present (null), an {@link HttpClient} will be
415+
* allocated and scoped to this
416+
* {@link RemoteRepositoryManager} instance, and closed
417+
* in {@link #close()}.
414418
* @param executor
415419
* An executor used to service http client requests. (optional).
416420
* When not present, an {@link Executor} will be allocated and
@@ -509,35 +513,42 @@ protected void finalize() throws Throwable {
509513
@Override
510514
public void close() throws Exception {
511515

512-
if (!m_closed) {
516+
if (m_closed) {
513517
// Already closed.
514518
return;
515519
}
516520

517-
if (httpClient instanceof AutoCloseable) {
518-
519-
/*
520-
* If the caller passed in an AutoCloseable HttpClient, then we shut
521-
* it down now.
522-
*/
523-
((AutoCloseable) httpClient).close();
524-
525-
}
526521

527522
if (our_httpClient != null) {
528-
523+
529524
/*
530525
* This HttpClient was allocated by our constructor. We will shut it
531526
* down now (unless it is already stopping or stopped).
532527
*/
533528

534-
if (!our_httpClient.isStopping() && !our_httpClient.isStopped()) {
529+
if (our_httpClient instanceof AutoCloseable) {
530+
// The instance is managed by AutoCloseHttpClient or a similar
531+
// class, so close() instead of just stop():
532+
((AutoCloseable) our_httpClient).close();
533+
} else {
534+
// Not an AutoCloseable, but we should still try to stop it:
535+
536+
if (!our_httpClient.isStopping() && !our_httpClient.isStopped()) {
535537

536-
our_httpClient.stop();
538+
our_httpClient.stop();
537539

540+
}
538541
}
539542

540543
}
544+
545+
// Note that we do not close httpClient here, unless it is
546+
// our_httpClient, because it came as
547+
// a parameter to a constructor, may be shared by multiple
548+
// RemoteRepositoryManager instances and other objects, and
549+
// thus has to be closed elswhere (e.g., QueryEngine.shutdown()).
550+
551+
541552

542553
if (our_executor != null) {
543554

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.1.0</version>
31+
<version>2.1.1</version>
3232
<relativePath>../pom.xml</relativePath>
3333
</parent>
3434
<groupId>com.blazegraph</groupId>
3535
<artifactId>bigdata-common-util</artifactId>
36-
<version>2.1.0</version>
36+
<version>2.1.1</version>
3737
<name>Blazegraph Common Utilities</name>
3838
<description>Blazegraph utilities common across artifacts</description>
3939
<build>

0 commit comments

Comments
 (0)