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

Switch to Threaded View
HBase >> mail # dev >> possible improvement to compaction invocation


Copy link to this message
-
possible improvement to compaction invocation
Hi,
I was looking at how compaction is invoked from HBaseAdmin (line 1460 in
trunk code)

        final String tableName = tableNameString(tableNameOrRegionName, ct);

        List<Pair<HRegionInfo, ServerName>> pairs
          MetaReader.getTableRegionsAndLocations(ct,

              tableName);

        for (Pair<HRegionInfo, ServerName> pair: pairs) {

          if (pair.getFirst().isOffline()) continue;

          if (pair.getSecond() == null) continue;

          try {

            compact(pair.getSecond(), pair.getFirst(), major, columnFamily);

We issue one compaction request per region.

Looks like we can group regions which reside on the same server and make
one network trip per region server.
Your comment on this would be appreciated.