docs: public Map<String, Object> getQueryStats(final int index, 
        final boolean with_scanners) {
      
      final Map<QueryStat, Long> qs = query_stats.get(index);
      if (qs == null) {
        return null;
      }
      
      final Map<String, Object> query_map = new TreeMap<String, Object>();
      query_map.put("queryIndex", index);
      
      final Iterator<Entry<QueryStat, Long>> stats_it = 
          qs.entrySet().iterator();
      while (stats_it.hasNext()) {
        final Entry<QueryStat, Long> stat = stats_it.next();
        if (stat.getKey().is_time) {
          query_map.put(stat.getKey().toString(), 
              DateTime.msFromNano(stat.getValue()));
        } else {
          query_map.put(stat.getKey().toString(), stat.getValue());
        }
      }
      
      if (with_scanners) {
        final Map<Integer, Map<QueryStat, Long>> scanner_stats_map = 
            scanner_stats.get(index);
        
        final Map<String, Object> scanner_maps = new TreeMap<String, Object>();
        
        query_map.put("scannerStats", scanner_maps);
        if (scanner_stats_map != null) {
          final Map<Integer, String> scanners = scanner_ids.get(index);
          final Iterator<Entry<Integer, Map<QueryStat, Long>>> scanner_it = 
              scanner_stats_map.entrySet().iterator();
          while (scanner_it.hasNext()) {
            final Entry<Integer, Map<QueryStat, Long>> scanner = scanner_it.next();
            final Map<String, Object> scanner_map = new TreeMap<String, Object>();
            scanner_maps.put(String.format("scannerIdx_%02d", scanner.getKey()), 
                scanner_map);
            final String id;
            if (scanners != null) {
              id = scanners.get(scanner.getKey());
            } else {
              id = null;
            }
            scanner_map.put("scannerId", id);
            /* Uncomment when AsyncHBase supports this
            final Map<Integer, Set<String>> servers = scanner_servers.get(index);
            if (servers != null) {
              scanner_map.put("regionServers", servers.get(scanner.getKey()));
            } else {
              scanner_map.put("regionServers", null);
            }
            */
            final Iterator<Entry<QueryStat, Long>> scanner_stats_it = 
                scanner.getValue().entrySet().iterator();
            while (scanner_stats_it.hasNext()) {
              final Entry<QueryStat, Long> scanner_stats = scanner_stats_it.next();
              if (!scanner_stats.getKey().is_time) {
                scanner_map.put(scanner_stats.getKey().toString(), 
                    scanner_stats.getValue());
              } else {
                scanner_map.put(scanner_stats.getKey().toString(), 
                    DateTime.msFromNano(scanner_stats.getValue()));
              }
            }
          }
        }
      }
      return query_map;
    }