ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mgerg...@apache.org
Subject ambari git commit: AMBARI-21507 ADDENDUM 2 Log Search Solr output properties should be provided by the Config API (mgergely)
Date Fri, 28 Jul 2017 12:16:57 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 0a14f07c8 -> 112885bef


AMBARI-21507 ADDENDUM 2 Log Search Solr output properties should be provided by the Config
API (mgergely)

Change-Id: Iafc167f985efd4ced6bc61a7ddcdcaf53beeaee8


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

Branch: refs/heads/trunk
Commit: 112885beffcc1e50d396651517b384387caae4e0
Parents: 0a14f07
Author: Miklos Gergely <mgergely@hortonworks.com>
Authored: Fri Jul 28 14:16:27 2017 +0200
Committer: Miklos Gergely <mgergely@hortonworks.com>
Committed: Fri Jul 28 14:16:41 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/ambari/logfeeder/output/OutputSolr.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/112885be/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
index 596e022..e3da864 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
@@ -232,8 +232,11 @@ public class OutputSolr extends Output implements CollectionStateWatcher
{
   @Override
   public boolean onStateChanged(Set<String> liveNodes, DocCollection collectionState)
{
     synchronized (propertiesLock) {
-      shards = new ArrayList<>(collectionState.getSlicesMap().keySet());
-      Collections.sort(shards);
+      if (collectionState != null) {
+        List<String> shards = new ArrayList<>(collectionState.getSlicesMap().keySet());
+        Collections.sort(shards);
+        this.shards = shards;
+      }
     }
     return false;
   }


Mime
View raw message