accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Turner <>
Subject Re: delete + insert case
Date Thu, 17 Mar 2016 16:50:20 GMT
On Thu, Mar 17, 2016 at 11:40 AM, z11373 <> wrote:

> Hi Josh,
> What I meant by better throughput is less times of calling flush().
> My service will receive user request, which is query string contains
> DELETE/INSERT statements, which will be translated to Accumulo delete/add
> operations. I used to call flush() for each operation, and that hurts
> performance. Luckily, by end of request, a callback function will be
> called,
> and there is where I make Accumulo flush call, and perf is improved,
> especially if the request generates Accumulo write operations.

If you had two batch writers (one for deletes and one for insert) then you
could flush them both in your callback.  Always flush the deletes batch
writer first.  Then you do not need to do it per statement.

I wouldn't recommend using System.currentTime because time can go backwards
in a distributed system.  When the time stamp goes backwards this can cause
newer updates to fall behind older ones.  When Accumulo sets timestamps it
goes through some trouble to ensure that time does not go backwards.

> Argh... System.currentTimeMillis() not really working, in my test, the add
> operation got same timestamp value as prior delete operation (addMutation
> is
> so fast!), I think I should use System.nanoTime()?
> Thanks,
> Z
> --
> View this message in context:
> Sent from the Developers mailing list archive at

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