atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Madhan Neethiraj <mad...@apache.org>
Subject Re: Review Request 66653: ATLAS-2578: Update metric queries for faster execution
Date Wed, 18 Apr 2018 05:00:55 GMT

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




intg/src/main/java/org/apache/atlas/model/metrics/AtlasMetrics.java
Line 80 (original), 76 (patched)
<https://reviews.apache.org/r/66653/#comment282608>

    Consider reusing getMetric(groupKey, key), to avoid duplicate code:
    
     public Number getNumericMetric(String groupKey, String key) {
       Object obj = getMetric(groupKey, key);
       
       return obj instanceof Number ? (Number) obj : null;
     }



repository/src/main/java/org/apache/atlas/services/MetricsService.java
Lines 139 (patched)
<https://reviews.apache.org/r/66653/#comment282609>

    given activeCount is Map<String, Number>, consider declaring "count" as Number.
    
    Same for line #150 and #164 as well.



repository/src/main/java/org/apache/atlas/services/MetricsService.java
Line 106 (original), 144 (patched)
<https://reviews.apache.org/r/66653/#comment282610>

    this may not be correct, as the type can be present in 'deletedCount'



repository/src/main/java/org/apache/atlas/util/AtlasGremlin3QueryProvider.java
Line 26 (original), 26 (patched)
<https://reviews.apache.org/r/66653/#comment282612>

    Would the following be efficient, which avoids having to pass a large list of types (and
 T.in check on each vertex)?
      g.V().has('__typeName').has('__state', 'ACTIVE').values('__typeName').groupCount()
    
    Similarly for line #29 below:
      g.V().has('__typeName').has('__state', 'DELETED').values('__typeName').groupCount()



webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java
Line 107 (original), 107 (patched)
<https://reviews.apache.org/r/66653/#comment282613>

    line break missing


- Madhan Neethiraj


On April 17, 2018, 5:13 p.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66653/
> -----------------------------------------------------------
> 
> (Updated April 17, 2018, 5:13 p.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-2578
>     https://issues.apache.org/jira/browse/ATLAS-2578
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Updated the business logic around metrics collection to allow faster collection of metrics
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/model/metrics/AtlasMetrics.java cfccc96c3 
>   repository/src/main/java/org/apache/atlas/services/MetricsService.java 0fa68b257 
>   repository/src/main/java/org/apache/atlas/util/AtlasGremlin2QueryProvider.java 1eb7323ce

>   repository/src/main/java/org/apache/atlas/util/AtlasGremlin3QueryProvider.java 72b7261dd

>   repository/src/main/java/org/apache/atlas/util/AtlasGremlinQueryProvider.java cca80b5ff

>   repository/src/test/java/org/apache/atlas/services/MetricsServiceTest.java bdc0f0327

>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java b648bc1e6 
> 
> 
> Diff: https://reviews.apache.org/r/66653/diff/1/
> 
> 
> Testing
> -------
> 
> PreCommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/278/
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message