You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Mohammad Arshad (Jira)" <ji...@apache.org> on 2023/06/28 09:57:00 UTC

[jira] [Created] (AMBARI-25963) Metrics metadata sync problem, accessing metrics which got created though other collector throws NPE

Mohammad Arshad created AMBARI-25963:
----------------------------------------

             Summary: Metrics metadata sync problem, accessing metrics which got created though other collector throws NPE
                 Key: AMBARI-25963
                 URL: https://issues.apache.org/jira/browse/AMBARI-25963
             Project: Ambari
          Issue Type: Bug
    Affects Versions: metrics-3.0.0
            Reporter: Mohammad Arshad
            Assignee: Mohammad Arshad


Metrics metadata sync problem, accessing metrics which got created though other collector throws NPE

*Steps to reproduce the issue:*

# Install ambari metrics with two collectors C1 and C2
# Submit following metrics through collector C1
{code:java}
{
  "metrics": [
    {
      "metricname": "cpu",
      "appid": "skywalking",
      "hostname": "hostXYZ",
      "starttime": 1687944230477,
      "metrics": {
        "1687944230477": 100,
        "1687944430477": 200
      }
    }
  ]
}
{code}
# http://COLLECTOR_C2_HOST:6188/ws/v1/timeline/metrics?metricNames=cpu&appId=skywalking&hostname=hostXYZ API call returns
{noformat}
{
    "exception": "NullPointerException",
    "javaClassName": "java.lang.NullPointerException"
}
{noformat}
In collector C2 log file following message is logged
{code}
2023-06-28 09:40:24,592 ERROR org.apache.ambari.metrics.core.timeline.discovery.TimelineMetricMetadataManager: TimelineMetricMetadataKey is null for : [7, 73, 67, -94, 19, -102, 82, 114, 100, -66, -22, 79, -51, -107, -73, 64, -36, -72, -42, -103]
2023-06-28 09:40:24,594 WARN org.apache.hadoop.yarn.webapp.GenericExceptionHandler: INTERNAL_SERVER_ERROR
java.lang.NullPointerException
        at org.apache.ambari.metrics.core.timeline.PhoenixHBaseAccessor.getLastTimelineMetricFromResultSet(PhoenixHBaseAccessor.java:457)
        at org.apache.ambari.metrics.core.timeline.PhoenixHBaseAccessor.getLatestMetricRecords(PhoenixHBaseAccessor.java:1150)
        at org.apache.ambari.metrics.core.timeline.PhoenixHBaseAccessor.getMetricRecords(PhoenixHBaseAccessor.java:966)
        at org.apache.ambari.metrics.core.timeline.HBaseTimelineMetricsService.getTimelineMetrics(HBaseTimelineMetricsService.java:294)
        at org.apache.ambari.metrics.webapp.TimelineWebServices.getTimelineMetrics(TimelineWebServices.java:267)
{code}
Same behaviour is there even after 5 minutes which is the default ambari metrics metadata sync interval.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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