ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [37/45] ambari git commit: AMBARI-20766 Log Feeder fill cluster name if it is not set (mgergely)
Date Mon, 24 Apr 2017 02:21:19 GMT
AMBARI-20766 Log Feeder fill cluster name if it is not set (mgergely)

Change-Id: I2eb255ca80bcbfd7f2d43ce6e3bcb98b88a294fd


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

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: df4706e73953e3c24e76878bc7590c175200cf78
Parents: 99f1660
Author: Miklos Gergely <mgergely@hortonworks.com>
Authored: Fri Apr 21 18:21:32 2017 +0200
Committer: Miklos Gergely <mgergely@hortonworks.com>
Committed: Fri Apr 21 18:21:32 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/ambari/logfeeder/output/OutputManager.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/df4706e7/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputManager.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputManager.java
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputManager.java
index 9a9f973..135fb32 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputManager.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputManager.java
@@ -71,7 +71,7 @@ public class OutputManager {
 
     // Update the block with the context fields
     for (Map.Entry<String, String> entry : input.getContextFields().entrySet()) {
-      if (jsonObj.get(entry.getKey()) == null) {
+      if (jsonObj.get(entry.getKey()) == null || entry.getKey().equals("cluster") &&
"null".equals(jsonObj.get(entry.getKey()))) {
         jsonObj.put(entry.getKey(), entry.getValue());
       }
     }


Mime
View raw message