Sergey Shelukhin created AMBARI-22908:
-----------------------------------------

             Summary: division by 0 in metrics
                 Key: AMBARI-22908
                 URL: https://issues.apache.org/jira/browse/AMBARI-22908
             Project: Ambari
          Issue Type: Bug
            Reporter: Sergey Shelukhin


{noformat}
java.lang.ArithmeticException: / by zero at 
org.apache.hadoop.metrics2.sink.timeline.availability.MetricSinkWriteShardHostnameHashingStrategy.findCollectorShard(MetricSinkWriteShardHostnameHashingStrategy.java:39)
 at 
org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink$1.get(AbstractTimelineMetricsSink.java:400)
 at 
org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink$1.get(AbstractTimelineMetricsSink.java:390)
 at 
org.apache.hadoop.metrics2.sink.relocated.google.common.base.Suppliers$ExpiringMemoizingSupplier.get(Suppliers.java:192)
 at 
org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink.getCurrentCollectorHost(AbstractTimelineMetricsSink.java:218)
 at 
org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink.emitMetrics(AbstractTimelineMetricsSink.java:244)
 at 
org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink.putMetrics(HadoopTimelineMetricsSink.java:353)
 at 
org.apache.hadoop.metrics2.impl.MetricsSinkAdapter.consume(MetricsSinkAdapter.java:186)
 at 
org.apache.hadoop.metrics2.impl.MetricsSinkAdapter.consume(MetricsSinkAdapter.java:43)
 at org.apache.hadoop.metrics2.impl.SinkQueue.consumeAll(SinkQueue.java:87) at 
org.apache.hadoop.metrics2.impl.MetricsSinkAdapter.publishMetricsFromQueue(MetricsSinkAdapter.java:134)
 at 
org.apache.hadoop.metrics2.impl.MetricsSinkAdapter$1.run(MetricsSinkAdapter.java:88)
{noformat}

Looks like it should check for empty set or fail earlier with a more meaningful 
error.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to