hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Hsieh <...@cloudera.com>
Subject Re: possible improvement to compaction invocation
Date Thu, 21 Mar 2013 15:58:44 GMT
I tend to agree.  Making things grouped or concurrent makes sense in places
where there are bottle necks but where there are none, it just adds
complexity (which makes it more bug prone).

On Wed, Mar 20, 2013 at 2:27 PM, Jesse Yates <jesse.k.yates@gmail.com>wrote:

> Since compactions are long running, async jobs anyways, I don't see much
> gain in grouping these together. Sure, we might save a round-trip, but
> these are neither high-volume calls nor bottle-necked in the RTT of the
> request.
>
> It could be nice to see this unified though into a general multi-region
> Callable that can do do this same logic cleanly; certainly could think of a
> couple places we might want to do that.
> -------------------
> Jesse Yates
> @jesse_yates
> jyates.github.com
>
>
> On Wed, Mar 20, 2013 at 2:14 PM, Ted Yu <yuzhihong@gmail.com> wrote:
>
> > 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.
> >
>



-- 
// Jonathan Hsieh (shay)
// Software Engineer, Cloudera
// jon@cloudera.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message