You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@accumulo.apache.org by "Adam J. Shook" <ad...@gmail.com> on 2015/12/17 19:17:30 UTC

Midpoint between two splits

Hello all,

I've got an odd use case that requires me to calculate the midpoint between
two Accumulo splits.  I've been searching through the Accumulo source code
for a little bit trying to find where Accumulo automatically calculates a
new split.  I am assuming that the new split point is somewhere around the
midpoint of two existing splits, and I was hoping to just take that instead
of coding it up myself.

Is this assumption correct?  Could someone point it out to me so I can
borrow it?  Or maybe there is some API call to calculate the midpoint?

Thank you,
--Adam

Re: Midpoint between two splits

Posted by "Adam J. Shook" <ad...@gmail.com>.
Thank you, Eric!  Making this public may be helpful to others down the
road.  Unsure how many requests are out there for this kind of
functionality being public.

On Thu, Dec 17, 2015 at 3:58 PM, Eric Newton <er...@gmail.com> wrote:

> You'll want to look
> at org.apache.accumulo.server.util.FileUtil#findMidPoint. Note that it
> isn't in the public API, and can change in the future.
>
> -Eric
>
>
> On Thu, Dec 17, 2015 at 1:17 PM, Adam J. Shook <ad...@gmail.com>
> wrote:
>
>> Hello all,
>>
>> I've got an odd use case that requires me to calculate the midpoint
>> between two Accumulo splits.  I've been searching through the Accumulo
>> source code for a little bit trying to find where Accumulo automatically
>> calculates a new split.  I am assuming that the new split point is
>> somewhere around the midpoint of two existing splits, and I was hoping to
>> just take that instead of coding it up myself.
>>
>> Is this assumption correct?  Could someone point it out to me so I can
>> borrow it?  Or maybe there is some API call to calculate the midpoint?
>>
>> Thank you,
>> --Adam
>>
>
>

Re: Midpoint between two splits

Posted by Eric Newton <er...@gmail.com>.
You'll want to look
at org.apache.accumulo.server.util.FileUtil#findMidPoint. Note that it
isn't in the public API, and can change in the future.

-Eric


On Thu, Dec 17, 2015 at 1:17 PM, Adam J. Shook <ad...@gmail.com> wrote:

> Hello all,
>
> I've got an odd use case that requires me to calculate the midpoint
> between two Accumulo splits.  I've been searching through the Accumulo
> source code for a little bit trying to find where Accumulo automatically
> calculates a new split.  I am assuming that the new split point is
> somewhere around the midpoint of two existing splits, and I was hoping to
> just take that instead of coding it up myself.
>
> Is this assumption correct?  Could someone point it out to me so I can
> borrow it?  Or maybe there is some API call to calculate the midpoint?
>
> Thank you,
> --Adam
>