accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Turner <>
Subject Re: Query Statistics
Date Wed, 17 Apr 2013 15:11:49 GMT
On Wed, Apr 17, 2013 at 10:55 AM, Parker, Matthew - IS
<> wrote:
> Is there a way to collect statistics about how many tablet servers processed
> a query? Or any statistics for that matter?

The batch scanner does not provide this type of info.   It could be
estimated with the following code.  This code will determine what
tablet servers the batch scanner would talk to.  When executing the
query its possible that tablets may move and different tablet servers
may be contacted.

    List<Range> ranges; //ranges passed to batch scanner

    tableID = new Text(connector.tableOperations().tableIdMap().get(tableName));
    TabletLocator locator = TabletLocator.getInstance(instance,
credentials, tableID);

    Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new

    List<Range> failures = locator.binRanges(ranges, binnedRanges);

    if(failures.size() == 0){
      System.out.println("Number of servers queried :
      //retry?  some of the tablets needed for the query are not
assigned at the moment... the batch scanner will just retry in this


> ________________________________
> This e-mail and any files transmitted with it may be proprietary and are
> intended solely for the use of the individual or entity to whom they are
> addressed. If you have received this e-mail in error please notify the
> sender. Please note that any views or opinions presented in this e-mail are
> solely those of the author and do not necessarily represent those of Exelis
> Inc. The recipient should check this e-mail and any attachments for the
> presence of viruses. Exelis Inc. accepts no liability for any damage caused
> by any virus transmitted by this e-mail.

View raw message