You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/05/06 21:13:30 UTC

[GitHub] [accumulo] keith-turner commented on a change in pull request #1148: Quick query

keith-turner commented on a change in pull request #1148: Quick query
URL: https://github.com/apache/accumulo/pull/1148#discussion_r281363723
 
 

 ##########
 File path: server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
 ##########
 @@ -221,6 +229,30 @@ long calculateCount() {
     }
   }
 
+  public Query fetchQuery(String tableName, Range range) {
+    if (tableName == null)
+      tableName = "test_ingest";
+    ServerContext context = getContext();
+    Query result = new Query();
+    long count = 0L;
+    log.info("MIKE query value = " + range);
+
+    try {
+      BatchScanner scanner = context.createBatchScanner(tableName, Authorizations.EMPTY);
+      ArrayList<Range> ranges = new ArrayList<>();
+      ranges.add(range);
+      scanner.setRanges(ranges);
+      for (Entry<Key, Value> entry : scanner) {
 
 Review comment:
   This has the potential to bring a lot of data back to the monitor, which could take a really long time to complete.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services