This is an automated email from the ASF dual-hosted git repository.

sarath pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 178a1f8  ATLAS-3388 Re-use SOLR client for performance improvements.
178a1f8 is described below

commit 178a1f8f93bd491dec9e5bdb605e57b2f70cc987
Author: skoritala <[email protected]>
AuthorDate: Thu Aug 22 18:43:17 2019 -0700

    ATLAS-3388 Re-use SOLR client for performance improvements.
    
    Signed-off-by: Sarath Subramanian <[email protected]>
    (cherry picked from commit 7cf19213f9faf208dae7320f9c54012dcc6caeec)
---
 .../src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java 
b/graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java
index c704265..e457866 100644
--- 
a/graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java
+++ 
b/graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java
@@ -54,6 +54,7 @@ import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestInterceptor;
 import org.apache.http.client.HttpClient;
+import org.apache.http.client.utils.HttpClientUtils;
 import org.apache.http.entity.BufferedHttpEntity;
 import org.apache.http.impl.auth.KerberosScheme;
 import org.apache.http.protocol.HttpContext;
@@ -139,7 +140,7 @@ public class Solr6Index implements IndexProvider {
     private static final char   CHROOT_START_CHAR = '/';
 
     private static Solr6Index instance = null;
-    public static final ConfigOption<Boolean> CREATE_SOLR_CLIENT_PER_REQUEST = 
new ConfigOption(SOLR_NS, "create-client-per-request", "when false, allows the 
sharing of solr client across other components.", 
org.janusgraph.diskstorage.configuration.ConfigOption.Type.LOCAL, true);
+    public static final ConfigOption<Boolean> CREATE_SOLR_CLIENT_PER_REQUEST = 
new ConfigOption(SOLR_NS, "create-client-per-request", "when false, allows the 
sharing of solr client across other components.", 
org.janusgraph.diskstorage.configuration.ConfigOption.Type.LOCAL, false);
 
     private enum Mode {
         HTTP, CLOUD;
@@ -251,6 +252,9 @@ public class Solr6Index implements IndexProvider {
     }
 
     private SolrClient createSolrClient() {
+        if(logger.isDebugEnabled()) {
+            logger.debug("HttpClientBuilder = {}", 
HttpClientUtil.getHttpClientBuilder(), new Exception());
+        }
         final ModifiableSolrParams clientParams = new ModifiableSolrParams();
         SolrClient solrClient = null;
 

Reply via email to