-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50666/#review144370
-----------------------------------------------------------




ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricsAggregatorSink.java
 (line 27)
<https://reviews.apache.org/r/50666/#comment210385>

    Some documentation?



ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricsAggregatorSink.java
 (line 29)
<https://reviews.apache.org/r/50666/#comment210384>

    public keyword is not required in interfaces.



ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TimelineMetricsAggregatorMemorySink.java
 (line 37)
<https://reviews.apache.org/r/50666/#comment210379>

    Any particular reason for having static block? Why not instantiated while 
declaring the variable?



ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TimelineMetricsAggregatorMemorySink.java
 (line 38)
<https://reviews.apache.org/r/50666/#comment210378>

    You don't need to add type.
    hostAggregateRecords = new HashMap<>(); should work.



ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TimelineMetricsAggregatorMemorySink.java
 (line 47)
<https://reviews.apache.org/r/50666/#comment210383>

    As per our coding convention formatting for if else block should be 
    if () {
    
    } else {
    
    }



ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TimelineMetricsAggregatorMemorySink.java
 (line 49)
<https://reviews.apache.org/r/50666/#comment210381>

    Instead of storing hostAggregateMap, it should be copied and stored for 
following reason:
    - if hostAggregateMap is immutable, putAll in subsequent 
saveHostAggregateRecords call will fail.
    - Any add/delete operation on hostAggregateMap after calling 
saveHostAggregateRecords will be impact hostAggregateRecords.



ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TimelineMetricsAggregatorMemorySink.java
 (line 59)
<https://reviews.apache.org/r/50666/#comment210382>

    same here



ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TimelineMetricsAggregatorMemorySink.java
 (line 68)
<https://reviews.apache.org/r/50666/#comment210387>

    Any reason why getters are not part of interface?



ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TimelineMetricsAggregatorMemorySink.java
 (line 69)
<https://reviews.apache.org/r/50666/#comment210386>

    Do you want to return copy or immutable map?



ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessorTest.java
 (line 256)
<https://reviews.apache.org/r/50666/#comment210380>

    Map<TimelineClusterMetric, MetricClusterAggregate> clusterAggregateMap = 
new HashMap<>();


- Ajit Kumar


On Aug. 1, 2016, 6:31 p.m., Jameel Mohamed wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50666/
> -----------------------------------------------------------
> 
> (Updated Aug. 1, 2016, 6:31 p.m.)
> 
> 
> Review request for Ambari, Aravindan Vijayan, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-10145
>     https://issues.apache.org/jira/browse/AMBARI-10145
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Added new Interface to drain aggregated metrics to external storage. Added 
> unit test and sample implementation 
> (TimelineMetricsAggregatorMemorySink.java) to store metrics in memory.
> 
> 
> Diffs
> -----
> 
>   
> ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
>  dfd730d 
>   
> ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricConfiguration.java
>  e82d65a 
>   
> ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricsAggregatorSink.java
>  PRE-CREATION 
>   
> ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TimelineMetricsAggregatorMemorySink.java
>  PRE-CREATION 
>   
> ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessorTest.java
>  0ea668a 
> 
> Diff: https://reviews.apache.org/r/50666/diff/
> 
> 
> Testing
> -------
> 
> Manually tested.
> 
> 
> Added unit test.
> 
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Jameel Mohamed
> 
>

Reply via email to