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:17:26 UTC

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

ctubbsii commented on a change in pull request #1148: Quick query
URL: https://github.com/apache/accumulo/pull/1148#discussion_r281366665
 
 

 ##########
 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:
   That could kill the monitor, making it unavailable for other users, too. And, unauthenticated users being able to initiate this from a web page would make it a DoS vulnerability.

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