On Thu, Mar 21, 2013 at 2:40 PM, Enis Söztutar <[email protected]> wrote: > The problem around current META scanning is that there is more than one way > to do these, and the META layout is exposed. We should refrain from > exposing the META details. > AFAIK, these do the same thing: > MetaReader.Visitor > MetaScanner.MetaScannerVisitor, and > MetaUtils.ScannerListener
In this case MetaUtils is used for opening .META. outside of a running HBase cluster. MetaReader and MetaScanner run against a live cluster and contact the RS that hosts .META. But I agree that they all have bits of code that do the same thing, if for a different context. > > More concerning is that the code for managing META is spread over > MetaEditor, MetaReader, MetaScanner, MetaUtils, HRegionInfo (and maybe > more). There are a couple of issues to rework these interfaces, but I did > not get the chance to work on those. > > > Enis > > > > > > > > > On Thu, Mar 21, 2013 at 2:18 PM, Jean-Daniel Cryans > <[email protected]>wrote: > >> Mmmm I may have been trigger happy. You could pull back the >> ScannerListener and scanMetaRegion. >> >> BTW, why are you using a Vector instead of ArrayList? >> >> J-D >> >> On Thu, Mar 21, 2013 at 2:05 PM, Jean-Marc Spaggiari >> <[email protected]> wrote: >> > Hi, >> > >> > In trunk, since HBASE-3171 (Drop ROOT and instead store META >> > location(s) directly in ZooKeeper ) there is no more >> > MetaUtils.ScannerListener. >> > >> > In the merge, I used it to retreive all the regions belonging to a >> > specific table, from the META. kind of scan. >> > >> > // Retrieve the list of regions for this table. >> > final List<HRegionInfo> regions = new Vector<HRegionInfo>(); >> > utils.scanMetaRegion(HRegionInfo.FIRST_META_REGIONINFO, new >> > MetaUtils.ScannerListener() { >> > public boolean processRow(HRegionInfo info) { >> > if ((info != null) && >> > (Bytes.compareTo(info.getTableName(), tableName) == 0)) { >> > regions.add(info); >> > } >> > return true; >> > } >> > }); >> > >> > >> > Is there a recommanded way to replace that? The Merge is running >> > offline, so I can't do a scan. >> > >> > Thanks, >> > >> > JM >>
