Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo, mail # user - Query Statistics


Copy link to this message
-
Re: Query Statistics
Keith Turner 2013-04-17, 15:11
On Wed, Apr 17, 2013 at 10:55 AM, Parker, Matthew - IS
<[EMAIL PROTECTED]> 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
HashMap<String,Map<KeyExtent,List<Range>>>();

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

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

Keith

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