hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: Using put for nullifying qualifiers
Date Tue, 22 May 2012 20:45:53 GMT
That's right.

In HBase 0.94 and trunk, check out the following API in HRegion:
  public void mutateRowsWithLocks(Collection<Mutation> mutations,
      Collection<byte[]> rowsToLock) throws IOException {

It allows you to combine Put's and Delete's for a single region, atomically.

On Tue, May 22, 2012 at 1:22 PM, Kristoffer Sjögren <stoffe@gmail.com>wrote:

> Thanks, sounds like that should do it.
>
> So im guessing it is correct to assume that _all_ KeyValues added to a
> _single_ Put operation will either wholely succeed or wholely fail as long
> as they belong to the same row?
>
> On Tue, May 22, 2012 at 8:30 PM, Tom Brown <tombrown52@gmail.com> wrote:
>
> > I don't think you can include a delete with a put and keep it atomic.
> > You could include a null version of the column with your put, though,
> > for a similar effect.
> >
> > --Tom
> >
> > On Tue, May 22, 2012 at 10:55 AM, Kristoffer Sjögren <stoffe@gmail.com>
> > wrote:
> > > Hi
> > >
> > > I'm trying to use Put operations to replace ("set") already existing
> rows
> > > by nullify certain columns and qualifiers as part of an Put operation.
> > >
> > > The reason I want to do this is 1) keep the operation atomic/consistent
> > 2)
> > > avoid latency from first doing Delete then Put.
> > >
> > > Is there some way to do this kind of operation?
> > >
> > > Cheers,
> > > -Kristoffer
> >
>

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