You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by GitBox <gi...@apache.org> on 2022/11/15 09:16:16 UTC

[GitHub] [ambari-metrics] lucasbak commented on a diff in pull request #63: AMBARI-25563. Storm dashboards are not showing metrics.

lucasbak commented on code in PR #63:
URL: https://github.com/apache/ambari-metrics/pull/63#discussion_r1022531286


##########
ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/query/TransientMetricCondition.java:
##########
@@ -60,22 +60,22 @@ public StringBuilder getTransientConditionClause() {
     appendConjunction = appendHostnameClause(sb, appendConjunction);
 
     String appId = getAppId();
-    if (appId.contains("%")) {
-      appendConjunction = append(sb, appendConjunction, getAppId(), " APP_ID LIKE ?");
-    } else {
-      appendConjunction = append(sb, appendConjunction, getAppId(), " APP_ID = ?");
+    if (appId != null) {
+      if (appId.contains("%")) {
+        appendConjunction = append(sb, appendConjunction, getAppId(), " APP_ID LIKE ?");
+      } else {
+        appendConjunction = append(sb, appendConjunction, getAppId(), " APP_ID = ?");
+      }
     }
 
     String instanceId = getInstanceId();
-    if (instanceId.contains("%")) {
-      appendConjunction = append(sb, appendConjunction, getInstanceId(), " INSTANCE_ID LIKE ?");
-    } else {
-      appendConjunction = append(sb, appendConjunction, getInstanceId(), " INSTANCE_ID = ?");
+    if (instanceId != null) {
+      if (instanceId.contains("%")) {
+        appendConjunction = append(sb, appendConjunction, getInstanceId(), " INSTANCE_ID LIKE ?");
+      } else {
+        appendConjunction = append(sb, appendConjunction, getInstanceId(), " INSTANCE_ID = ?");
+      }
     }
-    appendConjunction = append(sb, appendConjunction, getStartTime(), " SERVER_TIME >= ?");
-    append(sb, appendConjunction, getEndTime(), " SERVER_TIME < ?");
-
-    return sb;

Review Comment:
   No need to delete those lines



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org