Hi Nicolas,
I'm done with the update. I have implemented HRegionInfo.getStartKey
to remove the loop in locateRegion(final byte[] regionName). Tests are
running and so far, so good. I will update the JIRA when the tests
will be done.
JM
2013/1/3, Jean-Marc Spaggiari :
> I found HRegionInfo.getTab
I found HRegionInfo.getTableName(regionName) to get the table name
quickly. Still searching for the startKey.
HRegionInfo.getStartKey(regionName) doesn't exist. Maybe I will have
to create it...
2013/1/3, Jean-Marc Spaggiari :
> Done. You can take a look at what I pushed.
>
> https://issues.apache
Done. You can take a look at what I pushed.
https://issues.apache.org/jira/browse/HBASE-7488
Regarding locateRegion(final byte[] regionName) I don't know if there
is a faster way to get the first row and the table name from the
regionName. Region name should already contain those 2 information. S
I will take a look at all of that and keep you posted shortly.
JM
2013/1/3, Nicolas Liochon :
> Yep, I'm ok with that. It will need to be put in the interface (vs. the
> implementation class). Would be nice if you could implement the two missing
> methods (i.e. public HRegionLocation locateRegion
Yep, I'm ok with that. It will need to be put in the interface (vs. the
implementation class). Would be nice if you could implement the two missing
methods (i.e. public HRegionLocation locateRegion(final byte [] regionName))
On Thu, Jan 3, 2013 at 7:33 PM, Jean-Marc Spaggiari wrote:
> public L
I have created HBASE-7488 to implement it.
Also, I think we should add this in the interface and do the related
implementation:
/**
* Gets the locations of all regions in the specified table, tableName.
* @param tableName table to get regions of
* @param offlined True if we are to incl
Hi,
It will work, but there is some glue code to write as one is returning one
region given a rowkey, while the not implemented one returns all the
version.
Code written by Lyska seems fine, we could put it in locateRegions (doing
this server side is more efficient)
Nicolas
On Thu, Jan 3, 2013
Hi,
thanks a lot!
as Nicolas wrote, I use
List regions = MetaScanner.listAllRegions(config);
for (HRegionInfo info : regions) {
HRegionLocation loc = connection.locateRegion(info.getTableName(),
info.getStartKey());
}
03.01.2013 2:34, Jean-M
Here is the code for locateRegion:
@Override
public List locateRegions(final byte [] tableName)
throws IOException {
// TODO implement. use old stuff or new stuff?
return null;
}
As you can see, it's like what Nicolas is saying. Always return null.
However, relocate
Hi,
It's actually not implemented (I will update the javadoc for the latest
version)
You can use locateRegion(final byte [] tableName, final byte [] row), and
iterates on all region start keys to get all the regions.
Cheers,
Nicolas
On Wed, Jan 2, 2013 at 5:17 PM, Lyska Anton wrote:
> Hi a
Hi all,
I want to write simple tool for rebalancing regions in cluster.
For that I need current location of all regions.
I've found method HConnection.locateRegions(tableName), but it always returns
null.
Also, i've tried to call HConnection.locateRegion(regionName), and it returns
null too.
s
11 matches
Mail list logo