You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by kevin su <pi...@gmail.com> on 2019/03/26 20:47:11 UTC
splitPoint parameter in splitRegionAsync
Hi Users,
I found that when we start to split region, used splitRegionAsync in
HbaseAdmin.
it only check whether the splitPoint is startkey or not.
should we also check splitPoint is endkey ?
Thanks.
Kevin
Re: splitPoint parameter in splitRegionAsync
Posted by kevin su <pi...@gmail.com>.
hi stack,
In the hbase/client/HBaseAdmin.java : https://goo.gl/hojSM3
<https://goo.gl/hojSM3>
Future<Void> splitRegionAsync(RegionInfo hri, byte[] splitPoint)
throws IOException {
TableName tableName = hri.getTable();
if (hri.getStartKey() != null && splitPoint != null &&
Bytes.compareTo(hri.getStartKey(), splitPoint) == 0) {
throw new IOException("should not give a splitkey which equals
to startkey!");
}
...
...
Thanks,
Kevin
Stack <st...@duboce.net> 於 2019年3月27日 週三 下午11:07寫道:
> That sounds right Kevin. Mind adding pointer to where in the code you are
> referring to?
> Thanks,
> S
>
> On Tue, Mar 26, 2019 at 1:47 PM kevin su <pi...@gmail.com> wrote:
>
> > Hi Users,
> >
> > I found that when we start to split region, used splitRegionAsync in
> > HbaseAdmin.
> > it only check whether the splitPoint is startkey or not.
> >
> > should we also check splitPoint is endkey ?
> >
> >
> > Thanks.
> >
> > Kevin
> >
>
Re: splitPoint parameter in splitRegionAsync
Posted by Stack <st...@duboce.net>.
That sounds right Kevin. Mind adding pointer to where in the code you are
referring to?
Thanks,
S
On Tue, Mar 26, 2019 at 1:47 PM kevin su <pi...@gmail.com> wrote:
> Hi Users,
>
> I found that when we start to split region, used splitRegionAsync in
> HbaseAdmin.
> it only check whether the splitPoint is startkey or not.
>
> should we also check splitPoint is endkey ?
>
>
> Thanks.
>
> Kevin
>
Re: splitPoint parameter in splitRegionAsync
Posted by kevin su <pi...@gmail.com>.
ok, I got you
Thanks stack.
Stack <st...@duboce.net> 於 2019年3月29日 週五 上午5:45寫道:
> The end key of one region is the start key of the next so cecking the
> startkey is sufficient?
> Thanks Kevin,
> S
>
>
> On Tue, Mar 26, 2019 at 1:47 PM kevin su <pi...@gmail.com> wrote:
>
> > Hi Users,
> >
> > I found that when we start to split region, used splitRegionAsync in
> > HbaseAdmin.
> > it only check whether the splitPoint is startkey or not.
> >
> > should we also check splitPoint is endkey ?
> >
> >
> > Thanks.
> >
> > Kevin
> >
>
Re: splitPoint parameter in splitRegionAsync
Posted by Stack <st...@duboce.net>.
The end key of one region is the start key of the next so cecking the
startkey is sufficient?
Thanks Kevin,
S
On Tue, Mar 26, 2019 at 1:47 PM kevin su <pi...@gmail.com> wrote:
> Hi Users,
>
> I found that when we start to split region, used splitRegionAsync in
> HbaseAdmin.
> it only check whether the splitPoint is startkey or not.
>
> should we also check splitPoint is endkey ?
>
>
> Thanks.
>
> Kevin
>