----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/71565/#review218071 -----------------------------------------------------------
agents-common/src/main/java/org/apache/ranger/plugin/model/RangerJVMMetricDef.java Lines 38 (patched) <https://reviews.apache.org/r/71565/#comment305582> RangerJVMMetricDef => RangerMetrics security-admin/src/main/java/org/apache/ranger/rest/MetricsREST.java Lines 49 (patched) <https://reviews.apache.org/r/71565/#comment305584> RangerJVMMetricUtil is defined as a "@Component". Can this be 'autowired' in MetricsREST, insteaded of instantiated here for every call? security-admin/src/main/java/org/apache/ranger/util/RangerJVMMetricUtil.java Lines 45 (patched) <https://reviews.apache.org/r/71565/#comment305583> RangerJVMMetricUtil => RangerMetricsUtil security-admin/src/main/java/org/apache/ranger/util/RangerJVMMetricUtil.java Lines 59 (patched) <https://reviews.apache.org/r/71565/#comment305588> Consider having 'values' and 'memory' as local variables in getValues() method, as they need to be populated for each call. security-admin/src/main/java/org/apache/ranger/util/RangerJVMMetricUtil.java Lines 78 (patched) <https://reviews.apache.org/r/71565/#comment305585> I suggest to replace these key-names (like "JVM Machine Actual Name", "version", ..) with corresponding 'public static final' constants in MetricsREST. security-admin/src/main/java/org/apache/ranger/util/RangerJVMMetricUtil.java Lines 168 (patched) <https://reviews.apache.org/r/71565/#comment305587> StringUtils has a join method; can that not be used, instead of adding a new method? security-admin/src/main/java/org/apache/ranger/util/RangerJVMMetricUtil.java Lines 180 (patched) <https://reviews.apache.org/r/71565/#comment305586> getValues() seems to be the only public method. To make it easier to read, consider moving all public methods before protected/private methods. - Madhan Neethiraj On Oct. 4, 2019, 1:28 p.m., Fatima Khan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/71565/ > ----------------------------------------------------------- > > (Updated Oct. 4, 2019, 1:28 p.m.) > > > Review request for ranger, Ankita Sinha, Gautam Borad, Abhay Kulkarni, Madhan > Neethiraj, Mehul Parikh, Nikhil P, Pradeep Agrawal, Ramesh Mani, and > Selvamohan Neethiraj. > > > Bugs: RANGER-2589 > https://issues.apache.org/jira/browse/RANGER-2589 > > > Repository: ranger > > > Description > ------- > > Important JVM attributes can be returned via Ranger REST API : > > heap memory usage > GC time > # of open threads > # of open file descriptors > > > Diffs > ----- > > > agents-common/src/main/java/org/apache/ranger/plugin/model/RangerJVMMetricDef.java > PRE-CREATION > security-admin/src/main/java/org/apache/ranger/rest/MetricsREST.java > PRE-CREATION > > security-admin/src/main/java/org/apache/ranger/util/RangerJVMMetricUtil.java > PRE-CREATION > security-admin/src/main/resources/conf.dist/security-applicationContext.xml > 672d4a6 > > > Diff: https://reviews.apache.org/r/71565/diff/4/ > > > Testing > ------- > > Getting the desired json > > > Thanks, > > Fatima Khan > >
