chukwa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject [1/2] chukwa git commit: CHUKWA-818. Convert Solr client to singleton to prevent connection leaks. (Eric Yang)
Date Sun, 05 Mar 2017 20:38:25 GMT
Repository: chukwa
Updated Branches:
  refs/heads/master ffd0d400e -> 971641927


CHUKWA-818. Convert Solr client to singleton to prevent connection leaks.  (Eric Yang)


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

Branch: refs/heads/master
Commit: 5bf50709d070144bf958616111efa57c6c0475a5
Parents: ffd0d40
Author: Eric Yang <eyang@apache.org>
Authored: Sun Mar 5 12:36:15 2017 -0800
Committer: Eric Yang <eyang@apache.org>
Committed: Sun Mar 5 12:36:15 2017 -0800

----------------------------------------------------------------------
 CHANGES.txt                                                       | 2 ++
 .../hadoop/chukwa/datacollection/writer/solr/SolrWriter.java      | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/chukwa/blob/5bf50709/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3780ac6..1d0eb56 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -29,6 +29,8 @@ Release 0.8 - 05/22/2016
 
   BUGS
 
+    CHUKWA-818. Convert Solr client to singleton to prevent connection leaks.  (Eric Yang)
+
     CHUKWA-808. Fix solr startup for Docker support.  (Eric Yang)
 
     CHUKWA-807. Update Docker support to current.  (Eric Yang)

http://git-wip-us.apache.org/repos/asf/chukwa/blob/5bf50709/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/solr/SolrWriter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/solr/SolrWriter.java
b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/solr/SolrWriter.java
index a0fd7ff..369b135 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/solr/SolrWriter.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/solr/SolrWriter.java
@@ -38,7 +38,7 @@ import org.apache.solr.common.SolrInputDocument;
 
 public class SolrWriter extends PipelineableWriter {
   private static Logger log = Logger.getLogger(SolrWriter.class);
-  private CloudSolrClient client;
+  private static CloudSolrClient client;
   private final static String ID = "id";
   private final static String SEQ_ID = "seqId";
   private final static String DATA_TYPE = "type";
@@ -119,7 +119,6 @@ public class SolrWriter extends PipelineableWriter {
       } catch (Exception e) {
         log.warn("Failed to store data to Solr Cloud.");
         log.warn(ExceptionUtil.getStackTrace(e));
-        client = null;
       }
     }
     try {


Mime
View raw message