accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [accumulo] milleruntime commented on a change in pull request #1148: Quick query
Date Tue, 07 May 2019 15:04:58 GMT
milleruntime commented on a change in pull request #1148: Quick query
URL: https://github.com/apache/accumulo/pull/1148#discussion_r281677564
 
 

 ##########
 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:
   Yeah good point. We could force the user to put in a valid range or something else to prevent
full table scan. 

----------------------------------------------------------------
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

Mime
View raw message