Commit 85280ddf by Sarath Subramanian

ATLAS-2959: Update metrics query to use index query instead of graph query for faster response

parent e272a28e
...@@ -44,6 +44,12 @@ public interface AtlasIndexQuery<V, E> { ...@@ -44,6 +44,12 @@ public interface AtlasIndexQuery<V, E> {
Iterator<Result<V, E>> vertices(int offset, int limit); Iterator<Result<V, E>> vertices(int offset, int limit);
/** /**
* Gets the total count of query results
* @return
*/
Long vertexTotals();
/**
* Query result from an index query. * Query result from an index query.
* *
* @param <V> * @param <V>
......
...@@ -77,6 +77,11 @@ public class AtlasJanusIndexQuery implements AtlasIndexQuery<AtlasJanusVertex, A ...@@ -77,6 +77,11 @@ public class AtlasJanusIndexQuery implements AtlasIndexQuery<AtlasJanusVertex, A
return Iterators.transform(results, function); return Iterators.transform(results, function);
} }
@Override
public Long vertexTotals() {
return query.vertexTotals();
}
/** /**
* Janus implementation of AtlasIndexQuery.Result. * Janus implementation of AtlasIndexQuery.Result.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment