You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2016/05/15 13:03:06 UTC

[1/6] jena git commit: JENA-576: Switch ot using http client 4.5 preferred builder.

Repository: jena
Updated Branches:
  refs/heads/master 587c66ae5 -> b32797880


JENA-576: Switch ot using http client 4.5 preferred builder.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/2cf88f31
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/2cf88f31
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/2cf88f31

Branch: refs/heads/master
Commit: 2cf88f3194602bb618f0af8a56314b74876e06ae
Parents: 587c66a
Author: Andy Seaborne <an...@apache.org>
Authored: Sat May 14 18:51:40 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat May 14 18:51:40 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/jena/fuseki/FusekiTest.java     | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/2cf88f31/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/FusekiTest.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/FusekiTest.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/FusekiTest.java
index 441d7f0..d963296 100644
--- a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/FusekiTest.java
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/FusekiTest.java
@@ -23,10 +23,10 @@ import java.util.Objects ;
 
 import org.apache.http.HttpResponse ;
 import org.apache.http.StatusLine ;
-import org.apache.http.client.HttpClient ;
 import org.apache.http.client.methods.HttpOptions ;
 import org.apache.http.client.methods.HttpUriRequest ;
-import org.apache.http.impl.client.SystemDefaultHttpClient ;
+import org.apache.http.impl.client.CloseableHttpClient ;
+import org.apache.http.impl.client.HttpClientBuilder ;
 import org.apache.http.protocol.HttpContext ;
 import org.apache.http.util.EntityUtils ;
 import org.apache.jena.atlas.web.HttpException ;
@@ -62,13 +62,13 @@ public class FusekiTest {
 
     /** Do an HTTP Options. */
     public static String execOptions(String url) {
-        try {
-            // Prepare and execute
-            HttpResponseHandler handler = HttpResponseLib.nullResponse ;
-            HttpClient httpClient = new SystemDefaultHttpClient() ;
+        // Prepare and execute
+        HttpResponseHandler handler = HttpResponseLib.nullResponse ;
+
+        try ( CloseableHttpClient httpClient = HttpClientBuilder.create().build() ) {
             HttpUriRequest request = new HttpOptions(url) ;
             HttpResponse response = httpClient.execute(request, (HttpContext)null);
-            
+
             // Response
             StatusLine statusLine = response.getStatusLine();
             int statusCode = statusLine.getStatusCode();
@@ -82,7 +82,7 @@ public class FusekiTest {
             if (handler != null)
                 handler.handle(url, response);
             return response.getFirstHeader(HttpNames.hAllow).getValue() ;
-        } catch (IOException ex) {
+        } catch (IOException ex) { 
             throw new HttpException(ex);
         }
     }


[4/6] jena git commit: Delete unused

Posted by an...@apache.org.
Delete unused

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/237de155
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/237de155
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/237de155

Branch: refs/heads/master
Commit: 237de155fd1e5bf8ccf3be46c54d01f71d29188f
Parents: 579f1dc
Author: Andy Seaborne <an...@apache.org>
Authored: Sat May 14 21:23:59 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat May 14 21:23:59 2016 +0100

----------------------------------------------------------------------
 .../jena/riot/web/TypedInputStreamHttp.java     | 51 --------------------
 1 file changed, 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/237de155/jena-arq/src/main/java/org/apache/jena/riot/web/TypedInputStreamHttp.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/web/TypedInputStreamHttp.java b/jena-arq/src/main/java/org/apache/jena/riot/web/TypedInputStreamHttp.java
deleted file mode 100644
index e1a6582..0000000
--- a/jena-arq/src/main/java/org/apache/jena/riot/web/TypedInputStreamHttp.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.jena.riot.web;
-
-import java.io.InputStream ;
-
-import org.apache.http.conn.ClientConnectionManager ;
-import org.apache.jena.atlas.web.MediaType ;
-import org.apache.jena.atlas.web.TypedInputStream ;
-
-/** Type streams for HTTP connections - includes Apache HTTP client specific cleanup */
-public class TypedInputStreamHttp extends TypedInputStream
-{
-    private ClientConnectionManager connectMgr ;
-
-    TypedInputStreamHttp(InputStream input, String contentType, ClientConnectionManager connectMgr)
-    {
-        this(input, MediaType.create(contentType), connectMgr) ;
-    }
-    
-    TypedInputStreamHttp(InputStream input, MediaType mt, ClientConnectionManager connectMgr)
-    {
-        super(input, mt.getContentType(), mt.getCharset(), null) ;
-        this.connectMgr = connectMgr ;
-    }
-    
-    @Override
-    public void close()
-    {
-        super.close() ;
-        if ( connectMgr != null )
-            connectMgr.shutdown() ;
-    }
-    
-}


[6/6] jena git commit: Add profile 'bootstrap'

Posted by an...@apache.org.
Add profile 'bootstrap'


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/b3279788
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/b3279788
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/b3279788

Branch: refs/heads/master
Commit: b327978801a67682ff9c6fe383b8087e633f2ec2
Parents: 0f46e91
Author: Andy Seaborne <an...@apache.org>
Authored: Sun May 15 14:02:44 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun May 15 14:02:44 2016 +0100

----------------------------------------------------------------------
 pom.xml | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/b3279788/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 036f5ec..cfa8947 100644
--- a/pom.xml
+++ b/pom.xml
@@ -90,6 +90,16 @@
     </profile>
 
     <profile>
+      <!-- From the start, up until profile "dev" -->
+      <id>bootstrap</id>
+       <modules>
+         <module>jena-parent</module>
+         <module>jena-shaded-guava</module>
+         <module>jena-iri</module>
+       </modules>
+    </profile>
+
+    <profile>
       <!--
           This is the complete profile, it builds everything including slow
           building modules and the distribution packages.


[5/6] jena git commit: Preparation for using httpClient new API.

Posted by an...@apache.org.
Preparation for using httpClient new API.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/0f46e918
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/0f46e918
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/0f46e918

Branch: refs/heads/master
Commit: 0f46e91893bff63e9b62cc68cdd97b28d9ed5585
Parents: 237de15
Author: Andy Seaborne <an...@apache.org>
Authored: Sun May 15 14:01:54 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun May 15 14:01:54 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/jena/riot/web/HttpOp.java   | 21 ++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/0f46e918/jena-arq/src/main/java/org/apache/jena/riot/web/HttpOp.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/web/HttpOp.java b/jena-arq/src/main/java/org/apache/jena/riot/web/HttpOp.java
index 32a9224..3c64815 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/web/HttpOp.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/web/HttpOp.java
@@ -38,6 +38,7 @@ import org.apache.http.entity.ContentType ;
 import org.apache.http.entity.InputStreamEntity ;
 import org.apache.http.entity.StringEntity ;
 import org.apache.http.impl.client.AbstractHttpClient ;
+import org.apache.http.impl.client.HttpClientBuilder ;
 import org.apache.http.impl.client.SystemDefaultHttpClient ;
 import org.apache.http.impl.conn.PoolingClientConnectionManager ;
 import org.apache.http.impl.conn.SchemeRegistryFactory ;
@@ -268,10 +269,26 @@ public class HttpOp {
         useDefaultClientWithAuthentication = useWithAuth;
     }
 
+    public static HttpClient createPoolingHttpClient() {
+        String s = System.getProperty("http.maxConnections", "5");
+        int max = Integer.parseInt(s);
+        return HttpClientBuilder.create()
+            .setMaxConnPerRoute(max)
+            .setMaxConnTotal(2*max)
+            .build() ;
+    }
+    
+//    /** @deprecated Use {@link #createPoolingHttpClient()} */
+//    @Deprecated
+//    public static HttpClient createCachingHttpClient() {
+//        return createPoolingHttpClient() ; 
+//    }
+    
     /**
      * Create an HttpClient that performs connection pooling. This can be used
      * with {@link #setDefaultHttpClient} or provided in the HttpOp calls.
      */
+    @SuppressWarnings("deprecation")
     public static HttpClient createCachingHttpClient() {
         return new SystemDefaultHttpClient() {
             /**
@@ -280,8 +297,8 @@ public class HttpOp {
              */
             @Override
             protected ClientConnectionManager createClientConnectionManager() {
-                PoolingClientConnectionManager connmgr = new PoolingClientConnectionManager(
-                        SchemeRegistryFactory.createSystemDefault());
+                PoolingClientConnectionManager connmgr = 
+                    new PoolingClientConnectionManager(SchemeRegistryFactory.createSystemDefault());
                 String s = System.getProperty("http.maxConnections", "5");
                 int max = Integer.parseInt(s);
                 connmgr.setDefaultMaxPerRoute(max);


[2/6] jena git commit: Remove unused

Posted by an...@apache.org.
Remove unused

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/ab22ace3
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/ab22ace3
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/ab22ace3

Branch: refs/heads/master
Commit: ab22ace3ac3120c57b53ae6b060ebde37022049e
Parents: 2cf88f3
Author: Andy Seaborne <an...@apache.org>
Authored: Sat May 14 21:23:38 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat May 14 21:23:38 2016 +0100

----------------------------------------------------------------------
 jena-tdb/src/main/java/org/apache/jena/tdb/assembler/VocabTDB.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/ab22ace3/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/VocabTDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/VocabTDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/VocabTDB.java
index d24b263..a9c9272 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/VocabTDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/VocabTDB.java
@@ -35,7 +35,7 @@ public class VocabTDB
     // Types
     public static final Resource tDatasetTDB        = Vocab.type(NS, "DatasetTDB") ;
     public static final Resource tGraphTDB          = Vocab.type(NS, "GraphTDB") ;
-    public static final Resource tGraphBDB          = Vocab.type(NS, "GraphBDB") ;
+//    public static final Resource tGraphBDB          = Vocab.type(NS, "GraphBDB") ;
 //    public static final Resource tTupleIndex        = Vocab.type(NS, "TupleIndex") ;
     public static final Resource tNodeTable         = Vocab.type(NS, "NodeTable") ;
 


[3/6] jena git commit: Minor tidy

Posted by an...@apache.org.
Minor tidy

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/579f1dcf
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/579f1dcf
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/579f1dcf

Branch: refs/heads/master
Commit: 579f1dcf7e14209383d2cd8647a467d6978abf1c
Parents: ab22ace
Author: Andy Seaborne <an...@apache.org>
Authored: Sat May 14 21:23:52 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat May 14 21:23:52 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/579f1dcf/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
index 22fd282..a7eaf8a 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
@@ -159,9 +159,7 @@ public class FusekiConfig {
     }
     
     private static Model readAssemblerFile(String filename) {
-        Model m = AssemblerUtils.readAssemblerFile(filename) ;
-        // Any extras.
-        return m ;
+        return AssemblerUtils.readAssemblerFile(filename) ;
     }
     
     private static void execute(Model m, String x) {