hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [hadoop] adoroszlai commented on a change in pull request #1583: HDDS-2071. Support filters in ozone insight point
Date Thu, 03 Oct 2019 19:43:16 GMT
adoroszlai commented on a change in pull request #1583: HDDS-2071. Support filters in ozone
insight point
URL: https://github.com/apache/hadoop/pull/1583#discussion_r331208222
 
 

 ##########
 File path: hadoop-ozone/insight/src/main/java/org/apache/hadoop/ozone/insight/BaseInsightPoint.java
 ##########
 @@ -185,4 +186,18 @@ public void addRpcMetrics(List<MetricGroupDisplay> metrics,
     metrics.add(performance);
   }
 
+  @Override
+  public boolean filterLog(Map<String, String> filters, String logLine) {
+    if (filters == null) {
+      return true;
+    }
+    boolean result = true;
+    for (Entry<String, String> entry : filters.entrySet()) {
+      if (!logLine.matches(
+          String.format(".*\\[%s=%s\\].*", entry.getKey(), entry.getValue()))) {
+        result = result & false;
 
 Review comment:
   Can be simplified to `return false;`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message