> On Aug. 3, 2016, 9:31 p.m., Sid Wagle wrote:
> > ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricsAggregatorSink.java,
> >  line 40
> > <https://reviews.apache.org/r/50666/diff/3/?file=1459427#file1459427line40>
> >
> >     Aggre with Aravindan's comment, tableName should not be part of the 
> > interface.
> 
> Jameel Mohamed wrote:
>     Fixed. Added this method to get the precision from table name.
>     
>     /**
>        * Get precision for a table
>        * @param tableName
>        * @return precision
>        */
>       private Precision getTablePrecision(String tableName) {
>         Precision tablePrecision = null;
>         switch (tableName) {
>         case METRICS_RECORD_TABLE_NAME:
>           tablePrecision = Precision.SECONDS;
>           break;
>         case METRICS_AGGREGATE_MINUTE_TABLE_NAME:
>         case METRICS_CLUSTER_AGGREGATE_MINUTE_TABLE_NAME:
>           tablePrecision = Precision.MINUTES;
>           break;
>         case METRICS_AGGREGATE_HOURLY_TABLE_NAME:
>         case METRICS_CLUSTER_AGGREGATE_HOURLY_TABLE_NAME:
>           tablePrecision = Precision.HOURS;
>           break;
>         case METRICS_AGGREGATE_DAILY_TABLE_NAME:
>         case METRICS_CLUSTER_AGGREGATE_DAILY_TABLE_NAME:
>           tablePrecision = Precision.DAYS;
>           break;
>         }
>         return tablePrecision;
>       }

Is the above code looks ok to get the precision?


- Jameel


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


On Aug. 1, 2016, 10:11 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, 10:11 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/metrics/timeline/PhoenixHBaseAccessorTest.java
>  0ea668a 
>   
> ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricsAggregatorMemorySink.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/50666/diff/
> 
> 
> Testing
> -------
> 
> Manually tested.
> 
> 
> Added unit test.
> 
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Jameel Mohamed
> 
>

Reply via email to