ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [23/50] [abbrv] ambari git commit: AMBARI-22526. Log Feeder: handle multiple '=' (split char) in key/value filter (oleewere)
Date Thu, 30 Nov 2017 14:25:17 GMT
AMBARI-22526. Log Feeder: handle multiple '=' (split char) in key/value filter (oleewere)


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

Branch: refs/heads/branch-feature-AMBARI-21674
Commit: 33ee1a7381237a6cd4a5159d0f8ddc601f342529
Parents: 530f1d5
Author: Oliver Szabo <oleewere@gmail.com>
Authored: Tue Nov 28 15:08:51 2017 +0100
Committer: Oliver Szabo <oleewere@gmail.com>
Committed: Tue Nov 28 15:17:31 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/33ee1a73/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
index 670b1c3..8e5aee8 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/filter/FilterKeyValue.java
@@ -128,14 +128,14 @@ public class FilterKeyValue extends Filter {
 
   private String[] getNameValue(String nv) {
     String splitPattern = Pattern.quote(valueSplit);
-    return nv.split(splitPattern);
+    return nv.split(splitPattern, 2);
   }
 
   private void logParseError(String inputStr) {
     errorMetric.value++;
     String logMessageKey = this.getClass().getSimpleName() + "_PARSEERROR";
     LogFeederUtil.logErrorMessageByInterval(logMessageKey, "Error parsing string. length="
+ inputStr.length() + ", input=" +
-        input.getShortDescription() + ". First upto 100 characters=" + StringUtils.abbreviate(inputStr,
100), null, LOG,
+        input.getShortDescription() + ". First upto 200 characters=" + StringUtils.abbreviate(inputStr,
200), null, LOG,
         Level.ERROR);
   }
 


Mime
View raw message