You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Jonathan Natkins <na...@wibidata.com> on 2013/03/07 18:55:06 UTC

Possible to delete a specific cell?

It was suggested to me that there might be a way to delete a cell in a
column for a particular timestamp, without masking all older values. Is
this true? Or have I been fed lies?

Thanks!
Natty

-- 
http://www.wibidata.com
office: 1.415.496.9424 x208
cell: 1.609.577.1600
twitter: @nattyice <http://www.twitter.com/nattyice>

Re: Possible to delete a specific cell?

Posted by Kevin O'dell <ke...@cloudera.com>.
Right, so the goal is just to be able to issue the delete command on a
single TS so that you don't delete the older data.  Today if you delete t2
you will also delete t3.  There are scenarios where you want to delete t1
and keep t2 and t3, especially if you accidentally wrote bad data.

On Thu, Mar 7, 2013 at 1:44 PM, Jean-Marc Spaggiari <jean-marc@spaggiari.org
> wrote:

> Today are you not going to delete t1 and t2 and keep t3? The marker
> will delete everything older than t2 only, right?
>
> To today we will keep only t3 but the idea is to keep also t1 if I
> understand correctly.
>
> 2013/3/7 Kevin O'dell <ke...@cloudera.com>:
> > JM,
> >
> >   If you delete t2, you will also wipe out t3 right now.
> >
> > On Thu, Mar 7, 2013 at 1:37 PM, Jean-Marc Spaggiari <
> jean-marc@spaggiari.org
> >> wrote:
> >
> >> Kevin,
> >>
> >> How do you see that? Like a specific cell format which can "cancel"
> >> once timestamp and no delete all the previous one?
> >>
> >> Like before compaction we can have
> >>
> >> v1:t1
> >> v1:t2
> >> v1:t3
> >> v1:d2 <= Delete only t2 version.
> >>
> >> And at compaction time we only keep that in mind and give this as a
> result:
> >> v1:t1
> >> v1:t3
> >>
> >> ?
> >>
> >> 2013/3/7 Jeff Kolesky <je...@opower.com>:
> >> > Yes, this behavior would be fantastic.  If you follow the Kiji/Wibi
> model
> >> > of using many versioned cells, being able to delete a specific cell
> >> without
> >> > deleting all cells prior to it would be very useful.
> >> >
> >> > Jeff
> >> >
> >> >
> >> > On Thu, Mar 7, 2013 at 10:26 AM, Kevin O'dell <
> kevin.odell@cloudera.com
> >> >wrote:
> >> >
> >> >> The problem is it kills all older cells.  We should probably file a
> JIRA
> >> >> for this, as this behavior would be nice.  Thoughts?:
> >> >>
> >> >> hbase(main):028:0> truncate 'tre'
> >> >>
> >> >> Truncating 'tre' table (it may take a while):
> >> >>
> >> >> - Disabling table...
> >> >>
> >> >> - Dropping table...
> >> >>
> >> >> - Creating table...
> >> >>
> >> >> 0 row(s) in 4.6060 seconds
> >> >>
> >> >>
> >> >> hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111
> >> >>
> >> >> 0 row(s) in 0.0220 seconds
> >> >>
> >> >>
> >> >> hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112
> >> >>
> >> >> 0 row(s) in 0.0060 seconds
> >> >>
> >> >>
> >> >> hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113
> >> >>
> >> >> 0 row(s) in 0.0120 seconds
> >> >>
> >> >>
> >> >> hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
> >> >>
> >> >> ROW
>  COLUMN+CELL
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> row1
> >>  column=cf1:c1,
> >> >> timestamp=113, value=abce
> >> >>
> >> >>
> >> >>
> >> >> row1
> >>  column=cf1:c1,
> >> >> timestamp=112, value=abcd
> >> >>
> >> >>
> >> >>
> >> >> row1
> >>  column=cf1:c1,
> >> >> timestamp=111, value=abc
> >> >>
> >> >>
> >> >> hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112
> >> >>
> >> >> 0 row(s) in 0.0110 seconds
> >> >>
> >> >>
> >> >> hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
> >> >>
> >> >> ROW
>  COLUMN+CELL
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>  row1
> >>  column=cf1:c1,
> >> >> timestamp=113, value=abce
> >> >>
> >> >>
> >> >>
> >> >> 1 row(s) in 0.0290 seconds
> >> >>
> >> >>
> >> >> On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <
> >> sergey@hortonworks.com
> >> >> >wrote:
> >> >>
> >> >> > Shouldn't you be able to insert delete with t belonging to (t2,
> t3) to
> >> >> > achieve this effect?
> >> >> >
> >> >> > On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <
> natty@wibidata.com
> >> >> > >wrote:
> >> >> >
> >> >> > > Yep, that's the scenario I was curious about. Thanks!
> >> >> > >
> >> >> > >
> >> >> > > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
> >> >> > > jean-marc@spaggiari.org> wrote:
> >> >> > >
> >> >> > > > Hi Jonathan,
> >> >> > > >
> >> >> > > > Is that what you mean?
> >> >> > > >
> >> >> > > > In the same CF:C
> >> >> > > > insert r1 v1 t1
> >> >> > > > insert r1 v2 t2
> >> >> > > > insert r1 v3 t3
> >> >> > > >
> >> >> > > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
> >> >> > > >
> >> >> > > > This is not possible. If you put a delete with t4, everything
> >> older
> >> >> > > > than t4 will be deleted when the compression will occur.
> >> >> > > >
> >> >> > > > JM
> >> >> > > >
> >> >> > > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> >> >> > > > > It was suggested to me that there might be a way to delete a
> >> cell
> >> >> in
> >> >> > a
> >> >> > > > > column for a particular timestamp, without masking all older
> >> >> values.
> >> >> > Is
> >> >> > > > > this true? Or have I been fed lies?
> >> >> > > > >
> >> >> > > > > Thanks!
> >> >> > > > > Natty
> >> >> > > > >
> >> >> > > > > --
> >> >> > > > > http://www.wibidata.com
> >> >> > > > > office: 1.415.496.9424 x208
> >> >> > > > > cell: 1.609.577.1600
> >> >> > > > > twitter: @nattyice <http://www.twitter.com/nattyice>
> >> >> > > >
> >> >> > >
> >> >> > >
> >> >> > >
> >> >> > > --
> >> >> > > http://www.wibidata.com
> >> >> > > office: 1.415.496.9424 x208
> >> >> > > cell: 1.609.577.1600
> >> >> > > twitter: @nattyice <http://www.twitter.com/nattyice>
> >> >> > >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Kevin O'Dell
> >> >> Customer Operations Engineer, Cloudera
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > *Jeff Kolesky*
> >> > Chief Software Architect
> >> > *Opower*
> >>
> >
> >
> >
> > --
> > Kevin O'Dell
> > Customer Operations Engineer, Cloudera
>



-- 
Kevin O'Dell
Customer Operations Engineer, Cloudera

Re: Possible to delete a specific cell?

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Today are you not going to delete t1 and t2 and keep t3? The marker
will delete everything older than t2 only, right?

To today we will keep only t3 but the idea is to keep also t1 if I
understand correctly.

2013/3/7 Kevin O'dell <ke...@cloudera.com>:
> JM,
>
>   If you delete t2, you will also wipe out t3 right now.
>
> On Thu, Mar 7, 2013 at 1:37 PM, Jean-Marc Spaggiari <jean-marc@spaggiari.org
>> wrote:
>
>> Kevin,
>>
>> How do you see that? Like a specific cell format which can "cancel"
>> once timestamp and no delete all the previous one?
>>
>> Like before compaction we can have
>>
>> v1:t1
>> v1:t2
>> v1:t3
>> v1:d2 <= Delete only t2 version.
>>
>> And at compaction time we only keep that in mind and give this as a result:
>> v1:t1
>> v1:t3
>>
>> ?
>>
>> 2013/3/7 Jeff Kolesky <je...@opower.com>:
>> > Yes, this behavior would be fantastic.  If you follow the Kiji/Wibi model
>> > of using many versioned cells, being able to delete a specific cell
>> without
>> > deleting all cells prior to it would be very useful.
>> >
>> > Jeff
>> >
>> >
>> > On Thu, Mar 7, 2013 at 10:26 AM, Kevin O'dell <kevin.odell@cloudera.com
>> >wrote:
>> >
>> >> The problem is it kills all older cells.  We should probably file a JIRA
>> >> for this, as this behavior would be nice.  Thoughts?:
>> >>
>> >> hbase(main):028:0> truncate 'tre'
>> >>
>> >> Truncating 'tre' table (it may take a while):
>> >>
>> >> - Disabling table...
>> >>
>> >> - Dropping table...
>> >>
>> >> - Creating table...
>> >>
>> >> 0 row(s) in 4.6060 seconds
>> >>
>> >>
>> >> hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111
>> >>
>> >> 0 row(s) in 0.0220 seconds
>> >>
>> >>
>> >> hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112
>> >>
>> >> 0 row(s) in 0.0060 seconds
>> >>
>> >>
>> >> hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113
>> >>
>> >> 0 row(s) in 0.0120 seconds
>> >>
>> >>
>> >> hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
>> >>
>> >> ROW                                                          COLUMN+CELL
>> >>
>> >>
>> >>
>> >>
>> >> row1
>>  column=cf1:c1,
>> >> timestamp=113, value=abce
>> >>
>> >>
>> >>
>> >> row1
>>  column=cf1:c1,
>> >> timestamp=112, value=abcd
>> >>
>> >>
>> >>
>> >> row1
>>  column=cf1:c1,
>> >> timestamp=111, value=abc
>> >>
>> >>
>> >> hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112
>> >>
>> >> 0 row(s) in 0.0110 seconds
>> >>
>> >>
>> >> hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
>> >>
>> >> ROW                                                          COLUMN+CELL
>> >>
>> >>
>> >>
>> >>
>> >>  row1
>>  column=cf1:c1,
>> >> timestamp=113, value=abce
>> >>
>> >>
>> >>
>> >> 1 row(s) in 0.0290 seconds
>> >>
>> >>
>> >> On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <
>> sergey@hortonworks.com
>> >> >wrote:
>> >>
>> >> > Shouldn't you be able to insert delete with t belonging to (t2, t3) to
>> >> > achieve this effect?
>> >> >
>> >> > On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <natty@wibidata.com
>> >> > >wrote:
>> >> >
>> >> > > Yep, that's the scenario I was curious about. Thanks!
>> >> > >
>> >> > >
>> >> > > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
>> >> > > jean-marc@spaggiari.org> wrote:
>> >> > >
>> >> > > > Hi Jonathan,
>> >> > > >
>> >> > > > Is that what you mean?
>> >> > > >
>> >> > > > In the same CF:C
>> >> > > > insert r1 v1 t1
>> >> > > > insert r1 v2 t2
>> >> > > > insert r1 v3 t3
>> >> > > >
>> >> > > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
>> >> > > >
>> >> > > > This is not possible. If you put a delete with t4, everything
>> older
>> >> > > > than t4 will be deleted when the compression will occur.
>> >> > > >
>> >> > > > JM
>> >> > > >
>> >> > > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
>> >> > > > > It was suggested to me that there might be a way to delete a
>> cell
>> >> in
>> >> > a
>> >> > > > > column for a particular timestamp, without masking all older
>> >> values.
>> >> > Is
>> >> > > > > this true? Or have I been fed lies?
>> >> > > > >
>> >> > > > > Thanks!
>> >> > > > > Natty
>> >> > > > >
>> >> > > > > --
>> >> > > > > http://www.wibidata.com
>> >> > > > > office: 1.415.496.9424 x208
>> >> > > > > cell: 1.609.577.1600
>> >> > > > > twitter: @nattyice <http://www.twitter.com/nattyice>
>> >> > > >
>> >> > >
>> >> > >
>> >> > >
>> >> > > --
>> >> > > http://www.wibidata.com
>> >> > > office: 1.415.496.9424 x208
>> >> > > cell: 1.609.577.1600
>> >> > > twitter: @nattyice <http://www.twitter.com/nattyice>
>> >> > >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Kevin O'Dell
>> >> Customer Operations Engineer, Cloudera
>> >>
>> >
>> >
>> >
>> > --
>> > *Jeff Kolesky*
>> > Chief Software Architect
>> > *Opower*
>>
>
>
>
> --
> Kevin O'Dell
> Customer Operations Engineer, Cloudera

Re: Possible to delete a specific cell?

Posted by ramkrishna vasudevan <ra...@gmail.com>.
Yes Yong is right
/**
   * Delete the specified version of the specified column.
   * @param family family name
   * @param qualifier column qualifier
   * @param timestamp version timestamp
   * @return this for invocation chaining
   */
  @SuppressWarnings("unchecked")
  public Delete deleteColumn(byte [] family, byte [] qualifier, long
timestamp) {

This should help.  I am not sure why it is not supported via shell.  Need
to check on that.

Regards
Ram

On Fri, Mar 8, 2013 at 2:26 AM, yonghu <yo...@gmail.com> wrote:

> Hello,
>
> I think you can use HBase org.apache.hadoop.hbase.client.Delete class.
> It already supported to delete a specific version in a cell, see
> public Delete deleteColumn(byte[] family, byte[] qualifier, long
> timestamp) method.
>
> regards!
>
> Yong
>
> On Thu, Mar 7, 2013 at 9:25 PM, Jonathan Natkins <na...@wibidata.com>
> wrote:
> > For those who care, it turns out that this use case is currently
> possible,
> > just not through the hbase shell:
> >
> > hbase(main):002:0> scan 'del_test', { VERSIONS => 10 }
> > ROW                                           COLUMN+CELL
> >
> >
> >  key                                          column=f1:c1, timestamp=5,
> > value=value5
> >
> >  key                                          column=f1:c1, timestamp=4,
> > value=value4
> >
> >  key                                          column=f1:c1, timestamp=2,
> > value=value2
> >
> >  key                                          column=f1:c1, timestamp=1,
> > value=value1
> >
> > 1 row(s) in 0.0650 seconds
> >
> > Here's a small program to try it yourself:
> > https://gist.github.com/jnatkins/5111513
> >
> >
> >
> > On Thu, Mar 7, 2013 at 10:49 AM, Kevin O'dell <kevin.odell@cloudera.com
> >wrote:
> >
> >> Ted,
> >>
> >>  Yes that is correct, sorry 3 is newer than 1 when speak TSs.  Sorry for
> >> the confusion :)
> >>
> >> On Thu, Mar 7, 2013 at 1:48 PM, Ted Yu <yu...@gmail.com> wrote:
> >>
> >> > I think there was typo in Kevin's email: t3 should be t1
> >> >
> >> > On Thu, Mar 7, 2013 at 10:42 AM, Kevin O'dell <
> kevin.odell@cloudera.com
> >> > >wrote:
> >> >
> >> > > JM,
> >> > >
> >> > >   If you delete t2, you will also wipe out t3 right now.
> >> > >
> >> > > On Thu, Mar 7, 2013 at 1:37 PM, Jean-Marc Spaggiari <
> >> > > jean-marc@spaggiari.org
> >> > > > wrote:
> >> > >
> >> > > > Kevin,
> >> > > >
> >> > > > How do you see that? Like a specific cell format which can
> "cancel"
> >> > > > once timestamp and no delete all the previous one?
> >> > > >
> >> > > > Like before compaction we can have
> >> > > >
> >> > > > v1:t1
> >> > > > v1:t2
> >> > > > v1:t3
> >> > > > v1:d2 <= Delete only t2 version.
> >> > > >
> >> > > > And at compaction time we only keep that in mind and give this as
> a
> >> > > result:
> >> > > > v1:t1
> >> > > > v1:t3
> >> > > >
> >> > > > ?
> >> > > >
> >> > > > 2013/3/7 Jeff Kolesky <je...@opower.com>:
> >> > > > > Yes, this behavior would be fantastic.  If you follow the
> Kiji/Wibi
> >> > > model
> >> > > > > of using many versioned cells, being able to delete a specific
> cell
> >> > > > without
> >> > > > > deleting all cells prior to it would be very useful.
> >> > > > >
> >> > > > > Jeff
> >> > > > >
> >> > > > >
> >> > > > > On Thu, Mar 7, 2013 at 10:26 AM, Kevin O'dell <
> >> > > kevin.odell@cloudera.com
> >> > > > >wrote:
> >> > > > >
> >> > > > >> The problem is it kills all older cells.  We should probably
> file
> >> a
> >> > > JIRA
> >> > > > >> for this, as this behavior would be nice.  Thoughts?:
> >> > > > >>
> >> > > > >> hbase(main):028:0> truncate 'tre'
> >> > > > >>
> >> > > > >> Truncating 'tre' table (it may take a while):
> >> > > > >>
> >> > > > >> - Disabling table...
> >> > > > >>
> >> > > > >> - Dropping table...
> >> > > > >>
> >> > > > >> - Creating table...
> >> > > > >>
> >> > > > >> 0 row(s) in 4.6060 seconds
> >> > > > >>
> >> > > > >>
> >> > > > >> hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111
> >> > > > >>
> >> > > > >> 0 row(s) in 0.0220 seconds
> >> > > > >>
> >> > > > >>
> >> > > > >> hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112
> >> > > > >>
> >> > > > >> 0 row(s) in 0.0060 seconds
> >> > > > >>
> >> > > > >>
> >> > > > >> hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113
> >> > > > >>
> >> > > > >> 0 row(s) in 0.0120 seconds
> >> > > > >>
> >> > > > >>
> >> > > > >> hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS =>
> 4}
> >> > > > >>
> >> > > > >> ROW
> >> > >  COLUMN+CELL
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >> row1
> >> > > >  column=cf1:c1,
> >> > > > >> timestamp=113, value=abce
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >> row1
> >> > > >  column=cf1:c1,
> >> > > > >> timestamp=112, value=abcd
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >> row1
> >> > > >  column=cf1:c1,
> >> > > > >> timestamp=111, value=abc
> >> > > > >>
> >> > > > >>
> >> > > > >> hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112
> >> > > > >>
> >> > > > >> 0 row(s) in 0.0110 seconds
> >> > > > >>
> >> > > > >>
> >> > > > >> hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS =>
> 4}
> >> > > > >>
> >> > > > >> ROW
> >> > >  COLUMN+CELL
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >>  row1
> >> > > >  column=cf1:c1,
> >> > > > >> timestamp=113, value=abce
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >> 1 row(s) in 0.0290 seconds
> >> > > > >>
> >> > > > >>
> >> > > > >> On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <
> >> > > > sergey@hortonworks.com
> >> > > > >> >wrote:
> >> > > > >>
> >> > > > >> > Shouldn't you be able to insert delete with t belonging to
> (t2,
> >> > t3)
> >> > > to
> >> > > > >> > achieve this effect?
> >> > > > >> >
> >> > > > >> > On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <
> >> > > natty@wibidata.com
> >> > > > >> > >wrote:
> >> > > > >> >
> >> > > > >> > > Yep, that's the scenario I was curious about. Thanks!
> >> > > > >> > >
> >> > > > >> > >
> >> > > > >> > > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
> >> > > > >> > > jean-marc@spaggiari.org> wrote:
> >> > > > >> > >
> >> > > > >> > > > Hi Jonathan,
> >> > > > >> > > >
> >> > > > >> > > > Is that what you mean?
> >> > > > >> > > >
> >> > > > >> > > > In the same CF:C
> >> > > > >> > > > insert r1 v1 t1
> >> > > > >> > > > insert r1 v2 t2
> >> > > > >> > > > insert r1 v3 t3
> >> > > > >> > > >
> >> > > > >> > > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
> >> > > > >> > > >
> >> > > > >> > > > This is not possible. If you put a delete with t4,
> >> everything
> >> > > > older
> >> > > > >> > > > than t4 will be deleted when the compression will occur.
> >> > > > >> > > >
> >> > > > >> > > > JM
> >> > > > >> > > >
> >> > > > >> > > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> >> > > > >> > > > > It was suggested to me that there might be a way to
> >> delete a
> >> > > > cell
> >> > > > >> in
> >> > > > >> > a
> >> > > > >> > > > > column for a particular timestamp, without masking all
> >> older
> >> > > > >> values.
> >> > > > >> > Is
> >> > > > >> > > > > this true? Or have I been fed lies?
> >> > > > >> > > > >
> >> > > > >> > > > > Thanks!
> >> > > > >> > > > > Natty
> >> > > > >> > > > >
> >> > > > >> > > > > --
> >> > > > >> > > > > http://www.wibidata.com
> >> > > > >> > > > > office: 1.415.496.9424 x208
> >> > > > >> > > > > cell: 1.609.577.1600
> >> > > > >> > > > > twitter: @nattyice <http://www.twitter.com/nattyice>
> >> > > > >> > > >
> >> > > > >> > >
> >> > > > >> > >
> >> > > > >> > >
> >> > > > >> > > --
> >> > > > >> > > http://www.wibidata.com
> >> > > > >> > > office: 1.415.496.9424 x208
> >> > > > >> > > cell: 1.609.577.1600
> >> > > > >> > > twitter: @nattyice <http://www.twitter.com/nattyice>
> >> > > > >> > >
> >> > > > >> >
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >> --
> >> > > > >> Kevin O'Dell
> >> > > > >> Customer Operations Engineer, Cloudera
> >> > > > >>
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > --
> >> > > > > *Jeff Kolesky*
> >> > > > > Chief Software Architect
> >> > > > > *Opower*
> >> > > >
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > Kevin O'Dell
> >> > > Customer Operations Engineer, Cloudera
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >> Kevin O'Dell
> >> Customer Operations Engineer, Cloudera
> >>
> >
> >
> >
> > --
> > http://www.wibidata.com
> > office: 1.415.496.9424 x208
> > cell: 1.609.577.1600
> > twitter: @nattyice <http://www.twitter.com/nattyice>
>

Re: Possible to delete a specific cell?

Posted by yonghu <yo...@gmail.com>.
Hello,

I think you can use HBase org.apache.hadoop.hbase.client.Delete class.
It already supported to delete a specific version in a cell, see
public Delete deleteColumn(byte[] family, byte[] qualifier, long
timestamp) method.

regards!

Yong

On Thu, Mar 7, 2013 at 9:25 PM, Jonathan Natkins <na...@wibidata.com> wrote:
> For those who care, it turns out that this use case is currently possible,
> just not through the hbase shell:
>
> hbase(main):002:0> scan 'del_test', { VERSIONS => 10 }
> ROW                                           COLUMN+CELL
>
>
>  key                                          column=f1:c1, timestamp=5,
> value=value5
>
>  key                                          column=f1:c1, timestamp=4,
> value=value4
>
>  key                                          column=f1:c1, timestamp=2,
> value=value2
>
>  key                                          column=f1:c1, timestamp=1,
> value=value1
>
> 1 row(s) in 0.0650 seconds
>
> Here's a small program to try it yourself:
> https://gist.github.com/jnatkins/5111513
>
>
>
> On Thu, Mar 7, 2013 at 10:49 AM, Kevin O'dell <ke...@cloudera.com>wrote:
>
>> Ted,
>>
>>  Yes that is correct, sorry 3 is newer than 1 when speak TSs.  Sorry for
>> the confusion :)
>>
>> On Thu, Mar 7, 2013 at 1:48 PM, Ted Yu <yu...@gmail.com> wrote:
>>
>> > I think there was typo in Kevin's email: t3 should be t1
>> >
>> > On Thu, Mar 7, 2013 at 10:42 AM, Kevin O'dell <kevin.odell@cloudera.com
>> > >wrote:
>> >
>> > > JM,
>> > >
>> > >   If you delete t2, you will also wipe out t3 right now.
>> > >
>> > > On Thu, Mar 7, 2013 at 1:37 PM, Jean-Marc Spaggiari <
>> > > jean-marc@spaggiari.org
>> > > > wrote:
>> > >
>> > > > Kevin,
>> > > >
>> > > > How do you see that? Like a specific cell format which can "cancel"
>> > > > once timestamp and no delete all the previous one?
>> > > >
>> > > > Like before compaction we can have
>> > > >
>> > > > v1:t1
>> > > > v1:t2
>> > > > v1:t3
>> > > > v1:d2 <= Delete only t2 version.
>> > > >
>> > > > And at compaction time we only keep that in mind and give this as a
>> > > result:
>> > > > v1:t1
>> > > > v1:t3
>> > > >
>> > > > ?
>> > > >
>> > > > 2013/3/7 Jeff Kolesky <je...@opower.com>:
>> > > > > Yes, this behavior would be fantastic.  If you follow the Kiji/Wibi
>> > > model
>> > > > > of using many versioned cells, being able to delete a specific cell
>> > > > without
>> > > > > deleting all cells prior to it would be very useful.
>> > > > >
>> > > > > Jeff
>> > > > >
>> > > > >
>> > > > > On Thu, Mar 7, 2013 at 10:26 AM, Kevin O'dell <
>> > > kevin.odell@cloudera.com
>> > > > >wrote:
>> > > > >
>> > > > >> The problem is it kills all older cells.  We should probably file
>> a
>> > > JIRA
>> > > > >> for this, as this behavior would be nice.  Thoughts?:
>> > > > >>
>> > > > >> hbase(main):028:0> truncate 'tre'
>> > > > >>
>> > > > >> Truncating 'tre' table (it may take a while):
>> > > > >>
>> > > > >> - Disabling table...
>> > > > >>
>> > > > >> - Dropping table...
>> > > > >>
>> > > > >> - Creating table...
>> > > > >>
>> > > > >> 0 row(s) in 4.6060 seconds
>> > > > >>
>> > > > >>
>> > > > >> hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111
>> > > > >>
>> > > > >> 0 row(s) in 0.0220 seconds
>> > > > >>
>> > > > >>
>> > > > >> hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112
>> > > > >>
>> > > > >> 0 row(s) in 0.0060 seconds
>> > > > >>
>> > > > >>
>> > > > >> hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113
>> > > > >>
>> > > > >> 0 row(s) in 0.0120 seconds
>> > > > >>
>> > > > >>
>> > > > >> hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
>> > > > >>
>> > > > >> ROW
>> > >  COLUMN+CELL
>> > > > >>
>> > > > >>
>> > > > >>
>> > > > >>
>> > > > >> row1
>> > > >  column=cf1:c1,
>> > > > >> timestamp=113, value=abce
>> > > > >>
>> > > > >>
>> > > > >>
>> > > > >> row1
>> > > >  column=cf1:c1,
>> > > > >> timestamp=112, value=abcd
>> > > > >>
>> > > > >>
>> > > > >>
>> > > > >> row1
>> > > >  column=cf1:c1,
>> > > > >> timestamp=111, value=abc
>> > > > >>
>> > > > >>
>> > > > >> hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112
>> > > > >>
>> > > > >> 0 row(s) in 0.0110 seconds
>> > > > >>
>> > > > >>
>> > > > >> hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
>> > > > >>
>> > > > >> ROW
>> > >  COLUMN+CELL
>> > > > >>
>> > > > >>
>> > > > >>
>> > > > >>
>> > > > >>  row1
>> > > >  column=cf1:c1,
>> > > > >> timestamp=113, value=abce
>> > > > >>
>> > > > >>
>> > > > >>
>> > > > >> 1 row(s) in 0.0290 seconds
>> > > > >>
>> > > > >>
>> > > > >> On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <
>> > > > sergey@hortonworks.com
>> > > > >> >wrote:
>> > > > >>
>> > > > >> > Shouldn't you be able to insert delete with t belonging to (t2,
>> > t3)
>> > > to
>> > > > >> > achieve this effect?
>> > > > >> >
>> > > > >> > On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <
>> > > natty@wibidata.com
>> > > > >> > >wrote:
>> > > > >> >
>> > > > >> > > Yep, that's the scenario I was curious about. Thanks!
>> > > > >> > >
>> > > > >> > >
>> > > > >> > > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
>> > > > >> > > jean-marc@spaggiari.org> wrote:
>> > > > >> > >
>> > > > >> > > > Hi Jonathan,
>> > > > >> > > >
>> > > > >> > > > Is that what you mean?
>> > > > >> > > >
>> > > > >> > > > In the same CF:C
>> > > > >> > > > insert r1 v1 t1
>> > > > >> > > > insert r1 v2 t2
>> > > > >> > > > insert r1 v3 t3
>> > > > >> > > >
>> > > > >> > > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
>> > > > >> > > >
>> > > > >> > > > This is not possible. If you put a delete with t4,
>> everything
>> > > > older
>> > > > >> > > > than t4 will be deleted when the compression will occur.
>> > > > >> > > >
>> > > > >> > > > JM
>> > > > >> > > >
>> > > > >> > > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
>> > > > >> > > > > It was suggested to me that there might be a way to
>> delete a
>> > > > cell
>> > > > >> in
>> > > > >> > a
>> > > > >> > > > > column for a particular timestamp, without masking all
>> older
>> > > > >> values.
>> > > > >> > Is
>> > > > >> > > > > this true? Or have I been fed lies?
>> > > > >> > > > >
>> > > > >> > > > > Thanks!
>> > > > >> > > > > Natty
>> > > > >> > > > >
>> > > > >> > > > > --
>> > > > >> > > > > http://www.wibidata.com
>> > > > >> > > > > office: 1.415.496.9424 x208
>> > > > >> > > > > cell: 1.609.577.1600
>> > > > >> > > > > twitter: @nattyice <http://www.twitter.com/nattyice>
>> > > > >> > > >
>> > > > >> > >
>> > > > >> > >
>> > > > >> > >
>> > > > >> > > --
>> > > > >> > > http://www.wibidata.com
>> > > > >> > > office: 1.415.496.9424 x208
>> > > > >> > > cell: 1.609.577.1600
>> > > > >> > > twitter: @nattyice <http://www.twitter.com/nattyice>
>> > > > >> > >
>> > > > >> >
>> > > > >>
>> > > > >>
>> > > > >>
>> > > > >> --
>> > > > >> Kevin O'Dell
>> > > > >> Customer Operations Engineer, Cloudera
>> > > > >>
>> > > > >
>> > > > >
>> > > > >
>> > > > > --
>> > > > > *Jeff Kolesky*
>> > > > > Chief Software Architect
>> > > > > *Opower*
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > Kevin O'Dell
>> > > Customer Operations Engineer, Cloudera
>> > >
>> >
>>
>>
>>
>> --
>> Kevin O'Dell
>> Customer Operations Engineer, Cloudera
>>
>
>
>
> --
> http://www.wibidata.com
> office: 1.415.496.9424 x208
> cell: 1.609.577.1600
> twitter: @nattyice <http://www.twitter.com/nattyice>

Re: Possible to delete a specific cell?

Posted by Jonathan Natkins <na...@wibidata.com>.
For those who care, it turns out that this use case is currently possible,
just not through the hbase shell:

hbase(main):002:0> scan 'del_test', { VERSIONS => 10 }
ROW                                           COLUMN+CELL


 key                                          column=f1:c1, timestamp=5,
value=value5

 key                                          column=f1:c1, timestamp=4,
value=value4

 key                                          column=f1:c1, timestamp=2,
value=value2

 key                                          column=f1:c1, timestamp=1,
value=value1

1 row(s) in 0.0650 seconds

Here's a small program to try it yourself:
https://gist.github.com/jnatkins/5111513



On Thu, Mar 7, 2013 at 10:49 AM, Kevin O'dell <ke...@cloudera.com>wrote:

> Ted,
>
>  Yes that is correct, sorry 3 is newer than 1 when speak TSs.  Sorry for
> the confusion :)
>
> On Thu, Mar 7, 2013 at 1:48 PM, Ted Yu <yu...@gmail.com> wrote:
>
> > I think there was typo in Kevin's email: t3 should be t1
> >
> > On Thu, Mar 7, 2013 at 10:42 AM, Kevin O'dell <kevin.odell@cloudera.com
> > >wrote:
> >
> > > JM,
> > >
> > >   If you delete t2, you will also wipe out t3 right now.
> > >
> > > On Thu, Mar 7, 2013 at 1:37 PM, Jean-Marc Spaggiari <
> > > jean-marc@spaggiari.org
> > > > wrote:
> > >
> > > > Kevin,
> > > >
> > > > How do you see that? Like a specific cell format which can "cancel"
> > > > once timestamp and no delete all the previous one?
> > > >
> > > > Like before compaction we can have
> > > >
> > > > v1:t1
> > > > v1:t2
> > > > v1:t3
> > > > v1:d2 <= Delete only t2 version.
> > > >
> > > > And at compaction time we only keep that in mind and give this as a
> > > result:
> > > > v1:t1
> > > > v1:t3
> > > >
> > > > ?
> > > >
> > > > 2013/3/7 Jeff Kolesky <je...@opower.com>:
> > > > > Yes, this behavior would be fantastic.  If you follow the Kiji/Wibi
> > > model
> > > > > of using many versioned cells, being able to delete a specific cell
> > > > without
> > > > > deleting all cells prior to it would be very useful.
> > > > >
> > > > > Jeff
> > > > >
> > > > >
> > > > > On Thu, Mar 7, 2013 at 10:26 AM, Kevin O'dell <
> > > kevin.odell@cloudera.com
> > > > >wrote:
> > > > >
> > > > >> The problem is it kills all older cells.  We should probably file
> a
> > > JIRA
> > > > >> for this, as this behavior would be nice.  Thoughts?:
> > > > >>
> > > > >> hbase(main):028:0> truncate 'tre'
> > > > >>
> > > > >> Truncating 'tre' table (it may take a while):
> > > > >>
> > > > >> - Disabling table...
> > > > >>
> > > > >> - Dropping table...
> > > > >>
> > > > >> - Creating table...
> > > > >>
> > > > >> 0 row(s) in 4.6060 seconds
> > > > >>
> > > > >>
> > > > >> hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111
> > > > >>
> > > > >> 0 row(s) in 0.0220 seconds
> > > > >>
> > > > >>
> > > > >> hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112
> > > > >>
> > > > >> 0 row(s) in 0.0060 seconds
> > > > >>
> > > > >>
> > > > >> hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113
> > > > >>
> > > > >> 0 row(s) in 0.0120 seconds
> > > > >>
> > > > >>
> > > > >> hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
> > > > >>
> > > > >> ROW
> > >  COLUMN+CELL
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >> row1
> > > >  column=cf1:c1,
> > > > >> timestamp=113, value=abce
> > > > >>
> > > > >>
> > > > >>
> > > > >> row1
> > > >  column=cf1:c1,
> > > > >> timestamp=112, value=abcd
> > > > >>
> > > > >>
> > > > >>
> > > > >> row1
> > > >  column=cf1:c1,
> > > > >> timestamp=111, value=abc
> > > > >>
> > > > >>
> > > > >> hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112
> > > > >>
> > > > >> 0 row(s) in 0.0110 seconds
> > > > >>
> > > > >>
> > > > >> hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
> > > > >>
> > > > >> ROW
> > >  COLUMN+CELL
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >>  row1
> > > >  column=cf1:c1,
> > > > >> timestamp=113, value=abce
> > > > >>
> > > > >>
> > > > >>
> > > > >> 1 row(s) in 0.0290 seconds
> > > > >>
> > > > >>
> > > > >> On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <
> > > > sergey@hortonworks.com
> > > > >> >wrote:
> > > > >>
> > > > >> > Shouldn't you be able to insert delete with t belonging to (t2,
> > t3)
> > > to
> > > > >> > achieve this effect?
> > > > >> >
> > > > >> > On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <
> > > natty@wibidata.com
> > > > >> > >wrote:
> > > > >> >
> > > > >> > > Yep, that's the scenario I was curious about. Thanks!
> > > > >> > >
> > > > >> > >
> > > > >> > > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
> > > > >> > > jean-marc@spaggiari.org> wrote:
> > > > >> > >
> > > > >> > > > Hi Jonathan,
> > > > >> > > >
> > > > >> > > > Is that what you mean?
> > > > >> > > >
> > > > >> > > > In the same CF:C
> > > > >> > > > insert r1 v1 t1
> > > > >> > > > insert r1 v2 t2
> > > > >> > > > insert r1 v3 t3
> > > > >> > > >
> > > > >> > > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
> > > > >> > > >
> > > > >> > > > This is not possible. If you put a delete with t4,
> everything
> > > > older
> > > > >> > > > than t4 will be deleted when the compression will occur.
> > > > >> > > >
> > > > >> > > > JM
> > > > >> > > >
> > > > >> > > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> > > > >> > > > > It was suggested to me that there might be a way to
> delete a
> > > > cell
> > > > >> in
> > > > >> > a
> > > > >> > > > > column for a particular timestamp, without masking all
> older
> > > > >> values.
> > > > >> > Is
> > > > >> > > > > this true? Or have I been fed lies?
> > > > >> > > > >
> > > > >> > > > > Thanks!
> > > > >> > > > > Natty
> > > > >> > > > >
> > > > >> > > > > --
> > > > >> > > > > http://www.wibidata.com
> > > > >> > > > > office: 1.415.496.9424 x208
> > > > >> > > > > cell: 1.609.577.1600
> > > > >> > > > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > > > >> > > >
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> > > --
> > > > >> > > http://www.wibidata.com
> > > > >> > > office: 1.415.496.9424 x208
> > > > >> > > cell: 1.609.577.1600
> > > > >> > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > > > >> > >
> > > > >> >
> > > > >>
> > > > >>
> > > > >>
> > > > >> --
> > > > >> Kevin O'Dell
> > > > >> Customer Operations Engineer, Cloudera
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > *Jeff Kolesky*
> > > > > Chief Software Architect
> > > > > *Opower*
> > > >
> > >
> > >
> > >
> > > --
> > > Kevin O'Dell
> > > Customer Operations Engineer, Cloudera
> > >
> >
>
>
>
> --
> Kevin O'Dell
> Customer Operations Engineer, Cloudera
>



-- 
http://www.wibidata.com
office: 1.415.496.9424 x208
cell: 1.609.577.1600
twitter: @nattyice <http://www.twitter.com/nattyice>

Re: Possible to delete a specific cell?

Posted by Kevin O'dell <ke...@cloudera.com>.
Ted,

 Yes that is correct, sorry 3 is newer than 1 when speak TSs.  Sorry for
the confusion :)

On Thu, Mar 7, 2013 at 1:48 PM, Ted Yu <yu...@gmail.com> wrote:

> I think there was typo in Kevin's email: t3 should be t1
>
> On Thu, Mar 7, 2013 at 10:42 AM, Kevin O'dell <kevin.odell@cloudera.com
> >wrote:
>
> > JM,
> >
> >   If you delete t2, you will also wipe out t3 right now.
> >
> > On Thu, Mar 7, 2013 at 1:37 PM, Jean-Marc Spaggiari <
> > jean-marc@spaggiari.org
> > > wrote:
> >
> > > Kevin,
> > >
> > > How do you see that? Like a specific cell format which can "cancel"
> > > once timestamp and no delete all the previous one?
> > >
> > > Like before compaction we can have
> > >
> > > v1:t1
> > > v1:t2
> > > v1:t3
> > > v1:d2 <= Delete only t2 version.
> > >
> > > And at compaction time we only keep that in mind and give this as a
> > result:
> > > v1:t1
> > > v1:t3
> > >
> > > ?
> > >
> > > 2013/3/7 Jeff Kolesky <je...@opower.com>:
> > > > Yes, this behavior would be fantastic.  If you follow the Kiji/Wibi
> > model
> > > > of using many versioned cells, being able to delete a specific cell
> > > without
> > > > deleting all cells prior to it would be very useful.
> > > >
> > > > Jeff
> > > >
> > > >
> > > > On Thu, Mar 7, 2013 at 10:26 AM, Kevin O'dell <
> > kevin.odell@cloudera.com
> > > >wrote:
> > > >
> > > >> The problem is it kills all older cells.  We should probably file a
> > JIRA
> > > >> for this, as this behavior would be nice.  Thoughts?:
> > > >>
> > > >> hbase(main):028:0> truncate 'tre'
> > > >>
> > > >> Truncating 'tre' table (it may take a while):
> > > >>
> > > >> - Disabling table...
> > > >>
> > > >> - Dropping table...
> > > >>
> > > >> - Creating table...
> > > >>
> > > >> 0 row(s) in 4.6060 seconds
> > > >>
> > > >>
> > > >> hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111
> > > >>
> > > >> 0 row(s) in 0.0220 seconds
> > > >>
> > > >>
> > > >> hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112
> > > >>
> > > >> 0 row(s) in 0.0060 seconds
> > > >>
> > > >>
> > > >> hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113
> > > >>
> > > >> 0 row(s) in 0.0120 seconds
> > > >>
> > > >>
> > > >> hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
> > > >>
> > > >> ROW
> >  COLUMN+CELL
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> row1
> > >  column=cf1:c1,
> > > >> timestamp=113, value=abce
> > > >>
> > > >>
> > > >>
> > > >> row1
> > >  column=cf1:c1,
> > > >> timestamp=112, value=abcd
> > > >>
> > > >>
> > > >>
> > > >> row1
> > >  column=cf1:c1,
> > > >> timestamp=111, value=abc
> > > >>
> > > >>
> > > >> hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112
> > > >>
> > > >> 0 row(s) in 0.0110 seconds
> > > >>
> > > >>
> > > >> hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
> > > >>
> > > >> ROW
> >  COLUMN+CELL
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>  row1
> > >  column=cf1:c1,
> > > >> timestamp=113, value=abce
> > > >>
> > > >>
> > > >>
> > > >> 1 row(s) in 0.0290 seconds
> > > >>
> > > >>
> > > >> On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <
> > > sergey@hortonworks.com
> > > >> >wrote:
> > > >>
> > > >> > Shouldn't you be able to insert delete with t belonging to (t2,
> t3)
> > to
> > > >> > achieve this effect?
> > > >> >
> > > >> > On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <
> > natty@wibidata.com
> > > >> > >wrote:
> > > >> >
> > > >> > > Yep, that's the scenario I was curious about. Thanks!
> > > >> > >
> > > >> > >
> > > >> > > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
> > > >> > > jean-marc@spaggiari.org> wrote:
> > > >> > >
> > > >> > > > Hi Jonathan,
> > > >> > > >
> > > >> > > > Is that what you mean?
> > > >> > > >
> > > >> > > > In the same CF:C
> > > >> > > > insert r1 v1 t1
> > > >> > > > insert r1 v2 t2
> > > >> > > > insert r1 v3 t3
> > > >> > > >
> > > >> > > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
> > > >> > > >
> > > >> > > > This is not possible. If you put a delete with t4, everything
> > > older
> > > >> > > > than t4 will be deleted when the compression will occur.
> > > >> > > >
> > > >> > > > JM
> > > >> > > >
> > > >> > > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> > > >> > > > > It was suggested to me that there might be a way to delete a
> > > cell
> > > >> in
> > > >> > a
> > > >> > > > > column for a particular timestamp, without masking all older
> > > >> values.
> > > >> > Is
> > > >> > > > > this true? Or have I been fed lies?
> > > >> > > > >
> > > >> > > > > Thanks!
> > > >> > > > > Natty
> > > >> > > > >
> > > >> > > > > --
> > > >> > > > > http://www.wibidata.com
> > > >> > > > > office: 1.415.496.9424 x208
> > > >> > > > > cell: 1.609.577.1600
> > > >> > > > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > > >> > > >
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> > > --
> > > >> > > http://www.wibidata.com
> > > >> > > office: 1.415.496.9424 x208
> > > >> > > cell: 1.609.577.1600
> > > >> > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > > >> > >
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> Kevin O'Dell
> > > >> Customer Operations Engineer, Cloudera
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > *Jeff Kolesky*
> > > > Chief Software Architect
> > > > *Opower*
> > >
> >
> >
> >
> > --
> > Kevin O'Dell
> > Customer Operations Engineer, Cloudera
> >
>



-- 
Kevin O'Dell
Customer Operations Engineer, Cloudera

Re: Possible to delete a specific cell?

Posted by Ted Yu <yu...@gmail.com>.
I think there was typo in Kevin's email: t3 should be t1

On Thu, Mar 7, 2013 at 10:42 AM, Kevin O'dell <ke...@cloudera.com>wrote:

> JM,
>
>   If you delete t2, you will also wipe out t3 right now.
>
> On Thu, Mar 7, 2013 at 1:37 PM, Jean-Marc Spaggiari <
> jean-marc@spaggiari.org
> > wrote:
>
> > Kevin,
> >
> > How do you see that? Like a specific cell format which can "cancel"
> > once timestamp and no delete all the previous one?
> >
> > Like before compaction we can have
> >
> > v1:t1
> > v1:t2
> > v1:t3
> > v1:d2 <= Delete only t2 version.
> >
> > And at compaction time we only keep that in mind and give this as a
> result:
> > v1:t1
> > v1:t3
> >
> > ?
> >
> > 2013/3/7 Jeff Kolesky <je...@opower.com>:
> > > Yes, this behavior would be fantastic.  If you follow the Kiji/Wibi
> model
> > > of using many versioned cells, being able to delete a specific cell
> > without
> > > deleting all cells prior to it would be very useful.
> > >
> > > Jeff
> > >
> > >
> > > On Thu, Mar 7, 2013 at 10:26 AM, Kevin O'dell <
> kevin.odell@cloudera.com
> > >wrote:
> > >
> > >> The problem is it kills all older cells.  We should probably file a
> JIRA
> > >> for this, as this behavior would be nice.  Thoughts?:
> > >>
> > >> hbase(main):028:0> truncate 'tre'
> > >>
> > >> Truncating 'tre' table (it may take a while):
> > >>
> > >> - Disabling table...
> > >>
> > >> - Dropping table...
> > >>
> > >> - Creating table...
> > >>
> > >> 0 row(s) in 4.6060 seconds
> > >>
> > >>
> > >> hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111
> > >>
> > >> 0 row(s) in 0.0220 seconds
> > >>
> > >>
> > >> hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112
> > >>
> > >> 0 row(s) in 0.0060 seconds
> > >>
> > >>
> > >> hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113
> > >>
> > >> 0 row(s) in 0.0120 seconds
> > >>
> > >>
> > >> hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
> > >>
> > >> ROW
>  COLUMN+CELL
> > >>
> > >>
> > >>
> > >>
> > >> row1
> >  column=cf1:c1,
> > >> timestamp=113, value=abce
> > >>
> > >>
> > >>
> > >> row1
> >  column=cf1:c1,
> > >> timestamp=112, value=abcd
> > >>
> > >>
> > >>
> > >> row1
> >  column=cf1:c1,
> > >> timestamp=111, value=abc
> > >>
> > >>
> > >> hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112
> > >>
> > >> 0 row(s) in 0.0110 seconds
> > >>
> > >>
> > >> hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
> > >>
> > >> ROW
>  COLUMN+CELL
> > >>
> > >>
> > >>
> > >>
> > >>  row1
> >  column=cf1:c1,
> > >> timestamp=113, value=abce
> > >>
> > >>
> > >>
> > >> 1 row(s) in 0.0290 seconds
> > >>
> > >>
> > >> On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <
> > sergey@hortonworks.com
> > >> >wrote:
> > >>
> > >> > Shouldn't you be able to insert delete with t belonging to (t2, t3)
> to
> > >> > achieve this effect?
> > >> >
> > >> > On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <
> natty@wibidata.com
> > >> > >wrote:
> > >> >
> > >> > > Yep, that's the scenario I was curious about. Thanks!
> > >> > >
> > >> > >
> > >> > > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
> > >> > > jean-marc@spaggiari.org> wrote:
> > >> > >
> > >> > > > Hi Jonathan,
> > >> > > >
> > >> > > > Is that what you mean?
> > >> > > >
> > >> > > > In the same CF:C
> > >> > > > insert r1 v1 t1
> > >> > > > insert r1 v2 t2
> > >> > > > insert r1 v3 t3
> > >> > > >
> > >> > > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
> > >> > > >
> > >> > > > This is not possible. If you put a delete with t4, everything
> > older
> > >> > > > than t4 will be deleted when the compression will occur.
> > >> > > >
> > >> > > > JM
> > >> > > >
> > >> > > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> > >> > > > > It was suggested to me that there might be a way to delete a
> > cell
> > >> in
> > >> > a
> > >> > > > > column for a particular timestamp, without masking all older
> > >> values.
> > >> > Is
> > >> > > > > this true? Or have I been fed lies?
> > >> > > > >
> > >> > > > > Thanks!
> > >> > > > > Natty
> > >> > > > >
> > >> > > > > --
> > >> > > > > http://www.wibidata.com
> > >> > > > > office: 1.415.496.9424 x208
> > >> > > > > cell: 1.609.577.1600
> > >> > > > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > >> > > >
> > >> > >
> > >> > >
> > >> > >
> > >> > > --
> > >> > > http://www.wibidata.com
> > >> > > office: 1.415.496.9424 x208
> > >> > > cell: 1.609.577.1600
> > >> > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > >> > >
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> Kevin O'Dell
> > >> Customer Operations Engineer, Cloudera
> > >>
> > >
> > >
> > >
> > > --
> > > *Jeff Kolesky*
> > > Chief Software Architect
> > > *Opower*
> >
>
>
>
> --
> Kevin O'Dell
> Customer Operations Engineer, Cloudera
>

Re: Possible to delete a specific cell?

Posted by Kevin O'dell <ke...@cloudera.com>.
JM,

  If you delete t2, you will also wipe out t3 right now.

On Thu, Mar 7, 2013 at 1:37 PM, Jean-Marc Spaggiari <jean-marc@spaggiari.org
> wrote:

> Kevin,
>
> How do you see that? Like a specific cell format which can "cancel"
> once timestamp and no delete all the previous one?
>
> Like before compaction we can have
>
> v1:t1
> v1:t2
> v1:t3
> v1:d2 <= Delete only t2 version.
>
> And at compaction time we only keep that in mind and give this as a result:
> v1:t1
> v1:t3
>
> ?
>
> 2013/3/7 Jeff Kolesky <je...@opower.com>:
> > Yes, this behavior would be fantastic.  If you follow the Kiji/Wibi model
> > of using many versioned cells, being able to delete a specific cell
> without
> > deleting all cells prior to it would be very useful.
> >
> > Jeff
> >
> >
> > On Thu, Mar 7, 2013 at 10:26 AM, Kevin O'dell <kevin.odell@cloudera.com
> >wrote:
> >
> >> The problem is it kills all older cells.  We should probably file a JIRA
> >> for this, as this behavior would be nice.  Thoughts?:
> >>
> >> hbase(main):028:0> truncate 'tre'
> >>
> >> Truncating 'tre' table (it may take a while):
> >>
> >> - Disabling table...
> >>
> >> - Dropping table...
> >>
> >> - Creating table...
> >>
> >> 0 row(s) in 4.6060 seconds
> >>
> >>
> >> hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111
> >>
> >> 0 row(s) in 0.0220 seconds
> >>
> >>
> >> hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112
> >>
> >> 0 row(s) in 0.0060 seconds
> >>
> >>
> >> hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113
> >>
> >> 0 row(s) in 0.0120 seconds
> >>
> >>
> >> hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
> >>
> >> ROW                                                          COLUMN+CELL
> >>
> >>
> >>
> >>
> >> row1
>  column=cf1:c1,
> >> timestamp=113, value=abce
> >>
> >>
> >>
> >> row1
>  column=cf1:c1,
> >> timestamp=112, value=abcd
> >>
> >>
> >>
> >> row1
>  column=cf1:c1,
> >> timestamp=111, value=abc
> >>
> >>
> >> hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112
> >>
> >> 0 row(s) in 0.0110 seconds
> >>
> >>
> >> hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
> >>
> >> ROW                                                          COLUMN+CELL
> >>
> >>
> >>
> >>
> >>  row1
>  column=cf1:c1,
> >> timestamp=113, value=abce
> >>
> >>
> >>
> >> 1 row(s) in 0.0290 seconds
> >>
> >>
> >> On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <
> sergey@hortonworks.com
> >> >wrote:
> >>
> >> > Shouldn't you be able to insert delete with t belonging to (t2, t3) to
> >> > achieve this effect?
> >> >
> >> > On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <natty@wibidata.com
> >> > >wrote:
> >> >
> >> > > Yep, that's the scenario I was curious about. Thanks!
> >> > >
> >> > >
> >> > > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
> >> > > jean-marc@spaggiari.org> wrote:
> >> > >
> >> > > > Hi Jonathan,
> >> > > >
> >> > > > Is that what you mean?
> >> > > >
> >> > > > In the same CF:C
> >> > > > insert r1 v1 t1
> >> > > > insert r1 v2 t2
> >> > > > insert r1 v3 t3
> >> > > >
> >> > > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
> >> > > >
> >> > > > This is not possible. If you put a delete with t4, everything
> older
> >> > > > than t4 will be deleted when the compression will occur.
> >> > > >
> >> > > > JM
> >> > > >
> >> > > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> >> > > > > It was suggested to me that there might be a way to delete a
> cell
> >> in
> >> > a
> >> > > > > column for a particular timestamp, without masking all older
> >> values.
> >> > Is
> >> > > > > this true? Or have I been fed lies?
> >> > > > >
> >> > > > > Thanks!
> >> > > > > Natty
> >> > > > >
> >> > > > > --
> >> > > > > http://www.wibidata.com
> >> > > > > office: 1.415.496.9424 x208
> >> > > > > cell: 1.609.577.1600
> >> > > > > twitter: @nattyice <http://www.twitter.com/nattyice>
> >> > > >
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > http://www.wibidata.com
> >> > > office: 1.415.496.9424 x208
> >> > > cell: 1.609.577.1600
> >> > > twitter: @nattyice <http://www.twitter.com/nattyice>
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >> Kevin O'Dell
> >> Customer Operations Engineer, Cloudera
> >>
> >
> >
> >
> > --
> > *Jeff Kolesky*
> > Chief Software Architect
> > *Opower*
>



-- 
Kevin O'Dell
Customer Operations Engineer, Cloudera

Re: Possible to delete a specific cell?

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Kevin,

How do you see that? Like a specific cell format which can "cancel"
once timestamp and no delete all the previous one?

Like before compaction we can have

v1:t1
v1:t2
v1:t3
v1:d2 <= Delete only t2 version.

And at compaction time we only keep that in mind and give this as a result:
v1:t1
v1:t3

?

2013/3/7 Jeff Kolesky <je...@opower.com>:
> Yes, this behavior would be fantastic.  If you follow the Kiji/Wibi model
> of using many versioned cells, being able to delete a specific cell without
> deleting all cells prior to it would be very useful.
>
> Jeff
>
>
> On Thu, Mar 7, 2013 at 10:26 AM, Kevin O'dell <ke...@cloudera.com>wrote:
>
>> The problem is it kills all older cells.  We should probably file a JIRA
>> for this, as this behavior would be nice.  Thoughts?:
>>
>> hbase(main):028:0> truncate 'tre'
>>
>> Truncating 'tre' table (it may take a while):
>>
>> - Disabling table...
>>
>> - Dropping table...
>>
>> - Creating table...
>>
>> 0 row(s) in 4.6060 seconds
>>
>>
>> hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111
>>
>> 0 row(s) in 0.0220 seconds
>>
>>
>> hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112
>>
>> 0 row(s) in 0.0060 seconds
>>
>>
>> hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113
>>
>> 0 row(s) in 0.0120 seconds
>>
>>
>> hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
>>
>> ROW                                                          COLUMN+CELL
>>
>>
>>
>>
>> row1                                                        column=cf1:c1,
>> timestamp=113, value=abce
>>
>>
>>
>> row1                                                        column=cf1:c1,
>> timestamp=112, value=abcd
>>
>>
>>
>> row1                                                        column=cf1:c1,
>> timestamp=111, value=abc
>>
>>
>> hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112
>>
>> 0 row(s) in 0.0110 seconds
>>
>>
>> hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
>>
>> ROW                                                          COLUMN+CELL
>>
>>
>>
>>
>>  row1                                                        column=cf1:c1,
>> timestamp=113, value=abce
>>
>>
>>
>> 1 row(s) in 0.0290 seconds
>>
>>
>> On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <sergey@hortonworks.com
>> >wrote:
>>
>> > Shouldn't you be able to insert delete with t belonging to (t2, t3) to
>> > achieve this effect?
>> >
>> > On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <natty@wibidata.com
>> > >wrote:
>> >
>> > > Yep, that's the scenario I was curious about. Thanks!
>> > >
>> > >
>> > > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
>> > > jean-marc@spaggiari.org> wrote:
>> > >
>> > > > Hi Jonathan,
>> > > >
>> > > > Is that what you mean?
>> > > >
>> > > > In the same CF:C
>> > > > insert r1 v1 t1
>> > > > insert r1 v2 t2
>> > > > insert r1 v3 t3
>> > > >
>> > > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
>> > > >
>> > > > This is not possible. If you put a delete with t4, everything older
>> > > > than t4 will be deleted when the compression will occur.
>> > > >
>> > > > JM
>> > > >
>> > > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
>> > > > > It was suggested to me that there might be a way to delete a cell
>> in
>> > a
>> > > > > column for a particular timestamp, without masking all older
>> values.
>> > Is
>> > > > > this true? Or have I been fed lies?
>> > > > >
>> > > > > Thanks!
>> > > > > Natty
>> > > > >
>> > > > > --
>> > > > > http://www.wibidata.com
>> > > > > office: 1.415.496.9424 x208
>> > > > > cell: 1.609.577.1600
>> > > > > twitter: @nattyice <http://www.twitter.com/nattyice>
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > http://www.wibidata.com
>> > > office: 1.415.496.9424 x208
>> > > cell: 1.609.577.1600
>> > > twitter: @nattyice <http://www.twitter.com/nattyice>
>> > >
>> >
>>
>>
>>
>> --
>> Kevin O'Dell
>> Customer Operations Engineer, Cloudera
>>
>
>
>
> --
> *Jeff Kolesky*
> Chief Software Architect
> *Opower*

Re: Possible to delete a specific cell?

Posted by Kevin O'dell <ke...@cloudera.com>.
I have filed https://issues.apache.org/jira/browse/HBASE-8029

On Thu, Mar 7, 2013 at 1:31 PM, Jeff Kolesky <je...@opower.com> wrote:

> Yes, this behavior would be fantastic.  If you follow the Kiji/Wibi model
> of using many versioned cells, being able to delete a specific cell without
> deleting all cells prior to it would be very useful.
>
> Jeff
>
>
> On Thu, Mar 7, 2013 at 10:26 AM, Kevin O'dell <kevin.odell@cloudera.com
> >wrote:
>
> > The problem is it kills all older cells.  We should probably file a JIRA
> > for this, as this behavior would be nice.  Thoughts?:
> >
> > hbase(main):028:0> truncate 'tre'
> >
> > Truncating 'tre' table (it may take a while):
> >
> > - Disabling table...
> >
> > - Dropping table...
> >
> > - Creating table...
> >
> > 0 row(s) in 4.6060 seconds
> >
> >
> > hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111
> >
> > 0 row(s) in 0.0220 seconds
> >
> >
> > hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112
> >
> > 0 row(s) in 0.0060 seconds
> >
> >
> > hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113
> >
> > 0 row(s) in 0.0120 seconds
> >
> >
> > hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
> >
> > ROW                                                          COLUMN+CELL
> >
> >
> >
> >
> > row1
>  column=cf1:c1,
> > timestamp=113, value=abce
> >
> >
> >
> > row1
>  column=cf1:c1,
> > timestamp=112, value=abcd
> >
> >
> >
> > row1
>  column=cf1:c1,
> > timestamp=111, value=abc
> >
> >
> > hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112
> >
> > 0 row(s) in 0.0110 seconds
> >
> >
> > hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
> >
> > ROW                                                          COLUMN+CELL
> >
> >
> >
> >
> >  row1
>  column=cf1:c1,
> > timestamp=113, value=abce
> >
> >
> >
> > 1 row(s) in 0.0290 seconds
> >
> >
> > On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <sergey@hortonworks.com
> > >wrote:
> >
> > > Shouldn't you be able to insert delete with t belonging to (t2, t3) to
> > > achieve this effect?
> > >
> > > On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <natty@wibidata.com
> > > >wrote:
> > >
> > > > Yep, that's the scenario I was curious about. Thanks!
> > > >
> > > >
> > > > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
> > > > jean-marc@spaggiari.org> wrote:
> > > >
> > > > > Hi Jonathan,
> > > > >
> > > > > Is that what you mean?
> > > > >
> > > > > In the same CF:C
> > > > > insert r1 v1 t1
> > > > > insert r1 v2 t2
> > > > > insert r1 v3 t3
> > > > >
> > > > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
> > > > >
> > > > > This is not possible. If you put a delete with t4, everything older
> > > > > than t4 will be deleted when the compression will occur.
> > > > >
> > > > > JM
> > > > >
> > > > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> > > > > > It was suggested to me that there might be a way to delete a cell
> > in
> > > a
> > > > > > column for a particular timestamp, without masking all older
> > values.
> > > Is
> > > > > > this true? Or have I been fed lies?
> > > > > >
> > > > > > Thanks!
> > > > > > Natty
> > > > > >
> > > > > > --
> > > > > > http://www.wibidata.com
> > > > > > office: 1.415.496.9424 x208
> > > > > > cell: 1.609.577.1600
> > > > > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > http://www.wibidata.com
> > > > office: 1.415.496.9424 x208
> > > > cell: 1.609.577.1600
> > > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > > >
> > >
> >
> >
> >
> > --
> > Kevin O'Dell
> > Customer Operations Engineer, Cloudera
> >
>
>
>
> --
> *Jeff Kolesky*
> Chief Software Architect
> *Opower*
>



-- 
Kevin O'Dell
Customer Operations Engineer, Cloudera

Re: Possible to delete a specific cell?

Posted by Jeff Kolesky <je...@opower.com>.
Yes, this behavior would be fantastic.  If you follow the Kiji/Wibi model
of using many versioned cells, being able to delete a specific cell without
deleting all cells prior to it would be very useful.

Jeff


On Thu, Mar 7, 2013 at 10:26 AM, Kevin O'dell <ke...@cloudera.com>wrote:

> The problem is it kills all older cells.  We should probably file a JIRA
> for this, as this behavior would be nice.  Thoughts?:
>
> hbase(main):028:0> truncate 'tre'
>
> Truncating 'tre' table (it may take a while):
>
> - Disabling table...
>
> - Dropping table...
>
> - Creating table...
>
> 0 row(s) in 4.6060 seconds
>
>
> hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111
>
> 0 row(s) in 0.0220 seconds
>
>
> hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112
>
> 0 row(s) in 0.0060 seconds
>
>
> hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113
>
> 0 row(s) in 0.0120 seconds
>
>
> hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
>
> ROW                                                          COLUMN+CELL
>
>
>
>
> row1                                                        column=cf1:c1,
> timestamp=113, value=abce
>
>
>
> row1                                                        column=cf1:c1,
> timestamp=112, value=abcd
>
>
>
> row1                                                        column=cf1:c1,
> timestamp=111, value=abc
>
>
> hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112
>
> 0 row(s) in 0.0110 seconds
>
>
> hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
>
> ROW                                                          COLUMN+CELL
>
>
>
>
>  row1                                                        column=cf1:c1,
> timestamp=113, value=abce
>
>
>
> 1 row(s) in 0.0290 seconds
>
>
> On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <sergey@hortonworks.com
> >wrote:
>
> > Shouldn't you be able to insert delete with t belonging to (t2, t3) to
> > achieve this effect?
> >
> > On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <natty@wibidata.com
> > >wrote:
> >
> > > Yep, that's the scenario I was curious about. Thanks!
> > >
> > >
> > > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
> > > jean-marc@spaggiari.org> wrote:
> > >
> > > > Hi Jonathan,
> > > >
> > > > Is that what you mean?
> > > >
> > > > In the same CF:C
> > > > insert r1 v1 t1
> > > > insert r1 v2 t2
> > > > insert r1 v3 t3
> > > >
> > > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
> > > >
> > > > This is not possible. If you put a delete with t4, everything older
> > > > than t4 will be deleted when the compression will occur.
> > > >
> > > > JM
> > > >
> > > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> > > > > It was suggested to me that there might be a way to delete a cell
> in
> > a
> > > > > column for a particular timestamp, without masking all older
> values.
> > Is
> > > > > this true? Or have I been fed lies?
> > > > >
> > > > > Thanks!
> > > > > Natty
> > > > >
> > > > > --
> > > > > http://www.wibidata.com
> > > > > office: 1.415.496.9424 x208
> > > > > cell: 1.609.577.1600
> > > > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > > >
> > >
> > >
> > >
> > > --
> > > http://www.wibidata.com
> > > office: 1.415.496.9424 x208
> > > cell: 1.609.577.1600
> > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > >
> >
>
>
>
> --
> Kevin O'Dell
> Customer Operations Engineer, Cloudera
>



-- 
*Jeff Kolesky*
Chief Software Architect
*Opower*

Re: Possible to delete a specific cell?

Posted by Sergey Shelukhin <se...@hortonworks.com>.
Nevermind, I misread the scenario the other way around.

On Thu, Mar 7, 2013 at 10:26 AM, Kevin O'dell <ke...@cloudera.com>wrote:

> The problem is it kills all older cells.  We should probably file a JIRA
> for this, as this behavior would be nice.  Thoughts?:
>
> hbase(main):028:0> truncate 'tre'
>
> Truncating 'tre' table (it may take a while):
>
> - Disabling table...
>
> - Dropping table...
>
> - Creating table...
>
> 0 row(s) in 4.6060 seconds
>
>
> hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111
>
> 0 row(s) in 0.0220 seconds
>
>
> hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112
>
> 0 row(s) in 0.0060 seconds
>
>
> hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113
>
> 0 row(s) in 0.0120 seconds
>
>
> hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
>
> ROW                                                          COLUMN+CELL
>
>
>
>
> row1                                                        column=cf1:c1,
> timestamp=113, value=abce
>
>
>
> row1                                                        column=cf1:c1,
> timestamp=112, value=abcd
>
>
>
> row1                                                        column=cf1:c1,
> timestamp=111, value=abc
>
>
> hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112
>
> 0 row(s) in 0.0110 seconds
>
>
> hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}
>
> ROW                                                          COLUMN+CELL
>
>
>
>
>  row1                                                        column=cf1:c1,
> timestamp=113, value=abce
>
>
>
> 1 row(s) in 0.0290 seconds
>
>
> On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <sergey@hortonworks.com
> >wrote:
>
> > Shouldn't you be able to insert delete with t belonging to (t2, t3) to
> > achieve this effect?
> >
> > On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <natty@wibidata.com
> > >wrote:
> >
> > > Yep, that's the scenario I was curious about. Thanks!
> > >
> > >
> > > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
> > > jean-marc@spaggiari.org> wrote:
> > >
> > > > Hi Jonathan,
> > > >
> > > > Is that what you mean?
> > > >
> > > > In the same CF:C
> > > > insert r1 v1 t1
> > > > insert r1 v2 t2
> > > > insert r1 v3 t3
> > > >
> > > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
> > > >
> > > > This is not possible. If you put a delete with t4, everything older
> > > > than t4 will be deleted when the compression will occur.
> > > >
> > > > JM
> > > >
> > > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> > > > > It was suggested to me that there might be a way to delete a cell
> in
> > a
> > > > > column for a particular timestamp, without masking all older
> values.
> > Is
> > > > > this true? Or have I been fed lies?
> > > > >
> > > > > Thanks!
> > > > > Natty
> > > > >
> > > > > --
> > > > > http://www.wibidata.com
> > > > > office: 1.415.496.9424 x208
> > > > > cell: 1.609.577.1600
> > > > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > > >
> > >
> > >
> > >
> > > --
> > > http://www.wibidata.com
> > > office: 1.415.496.9424 x208
> > > cell: 1.609.577.1600
> > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > >
> >
>
>
>
> --
> Kevin O'Dell
> Customer Operations Engineer, Cloudera
>

Re: Possible to delete a specific cell?

Posted by Kevin O'dell <ke...@cloudera.com>.
The problem is it kills all older cells.  We should probably file a JIRA
for this, as this behavior would be nice.  Thoughts?:

hbase(main):028:0> truncate 'tre'

Truncating 'tre' table (it may take a while):

- Disabling table...

- Dropping table...

- Creating table...

0 row(s) in 4.6060 seconds


hbase(main):029:0> put 'tre', 'row1', 'cf1:c1', 'abc', 111

0 row(s) in 0.0220 seconds


hbase(main):030:0> put 'tre', 'row1', 'cf1:c1', 'abcd', 112

0 row(s) in 0.0060 seconds


hbase(main):031:0> put 'tre', 'row1', 'cf1:c1', 'abce', 113

0 row(s) in 0.0120 seconds


hbase(main):032:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}

ROW                                                          COLUMN+CELL




row1                                                        column=cf1:c1,
timestamp=113, value=abce



row1                                                        column=cf1:c1,
timestamp=112, value=abcd



row1                                                        column=cf1:c1,
timestamp=111, value=abc


hbase(main):033:0> delete 'tre', 'row1', 'cf1:c1', 112

0 row(s) in 0.0110 seconds


hbase(main):034:0> scan 'tre', {NAME => 'cf1:c1', VERSIONS => 4}

ROW                                                          COLUMN+CELL




 row1                                                        column=cf1:c1,
timestamp=113, value=abce



1 row(s) in 0.0290 seconds


On Thu, Mar 7, 2013 at 1:22 PM, Sergey Shelukhin <se...@hortonworks.com>wrote:

> Shouldn't you be able to insert delete with t belonging to (t2, t3) to
> achieve this effect?
>
> On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <natty@wibidata.com
> >wrote:
>
> > Yep, that's the scenario I was curious about. Thanks!
> >
> >
> > On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
> > jean-marc@spaggiari.org> wrote:
> >
> > > Hi Jonathan,
> > >
> > > Is that what you mean?
> > >
> > > In the same CF:C
> > > insert r1 v1 t1
> > > insert r1 v2 t2
> > > insert r1 v3 t3
> > >
> > > Then you want to be able to delete r1 v3 t3 to see r1 v2?
> > >
> > > This is not possible. If you put a delete with t4, everything older
> > > than t4 will be deleted when the compression will occur.
> > >
> > > JM
> > >
> > > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> > > > It was suggested to me that there might be a way to delete a cell in
> a
> > > > column for a particular timestamp, without masking all older values.
> Is
> > > > this true? Or have I been fed lies?
> > > >
> > > > Thanks!
> > > > Natty
> > > >
> > > > --
> > > > http://www.wibidata.com
> > > > office: 1.415.496.9424 x208
> > > > cell: 1.609.577.1600
> > > > twitter: @nattyice <http://www.twitter.com/nattyice>
> > >
> >
> >
> >
> > --
> > http://www.wibidata.com
> > office: 1.415.496.9424 x208
> > cell: 1.609.577.1600
> > twitter: @nattyice <http://www.twitter.com/nattyice>
> >
>



-- 
Kevin O'Dell
Customer Operations Engineer, Cloudera

Re: Possible to delete a specific cell?

Posted by Sergey Shelukhin <se...@hortonworks.com>.
Shouldn't you be able to insert delete with t belonging to (t2, t3) to
achieve this effect?

On Thu, Mar 7, 2013 at 10:12 AM, Jonathan Natkins <na...@wibidata.com>wrote:

> Yep, that's the scenario I was curious about. Thanks!
>
>
> On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
> jean-marc@spaggiari.org> wrote:
>
> > Hi Jonathan,
> >
> > Is that what you mean?
> >
> > In the same CF:C
> > insert r1 v1 t1
> > insert r1 v2 t2
> > insert r1 v3 t3
> >
> > Then you want to be able to delete r1 v3 t3 to see r1 v2?
> >
> > This is not possible. If you put a delete with t4, everything older
> > than t4 will be deleted when the compression will occur.
> >
> > JM
> >
> > 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> > > It was suggested to me that there might be a way to delete a cell in a
> > > column for a particular timestamp, without masking all older values. Is
> > > this true? Or have I been fed lies?
> > >
> > > Thanks!
> > > Natty
> > >
> > > --
> > > http://www.wibidata.com
> > > office: 1.415.496.9424 x208
> > > cell: 1.609.577.1600
> > > twitter: @nattyice <http://www.twitter.com/nattyice>
> >
>
>
>
> --
> http://www.wibidata.com
> office: 1.415.496.9424 x208
> cell: 1.609.577.1600
> twitter: @nattyice <http://www.twitter.com/nattyice>
>

Re: Possible to delete a specific cell?

Posted by Jonathan Natkins <na...@wibidata.com>.
Yep, that's the scenario I was curious about. Thanks!


On Thu, Mar 7, 2013 at 10:04 AM, Jean-Marc Spaggiari <
jean-marc@spaggiari.org> wrote:

> Hi Jonathan,
>
> Is that what you mean?
>
> In the same CF:C
> insert r1 v1 t1
> insert r1 v2 t2
> insert r1 v3 t3
>
> Then you want to be able to delete r1 v3 t3 to see r1 v2?
>
> This is not possible. If you put a delete with t4, everything older
> than t4 will be deleted when the compression will occur.
>
> JM
>
> 2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> > It was suggested to me that there might be a way to delete a cell in a
> > column for a particular timestamp, without masking all older values. Is
> > this true? Or have I been fed lies?
> >
> > Thanks!
> > Natty
> >
> > --
> > http://www.wibidata.com
> > office: 1.415.496.9424 x208
> > cell: 1.609.577.1600
> > twitter: @nattyice <http://www.twitter.com/nattyice>
>



-- 
http://www.wibidata.com
office: 1.415.496.9424 x208
cell: 1.609.577.1600
twitter: @nattyice <http://www.twitter.com/nattyice>

Re: Possible to delete a specific cell?

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Hi Jonathan,

Is that what you mean?

In the same CF:C
insert r1 v1 t1
insert r1 v2 t2
insert r1 v3 t3

Then you want to be able to delete r1 v3 t3 to see r1 v2?

This is not possible. If you put a delete with t4, everything older
than t4 will be deleted when the compression will occur.

JM

2013/3/7 Jonathan Natkins <na...@wibidata.com>:
> It was suggested to me that there might be a way to delete a cell in a
> column for a particular timestamp, without masking all older values. Is
> this true? Or have I been fed lies?
>
> Thanks!
> Natty
>
> --
> http://www.wibidata.com
> office: 1.415.496.9424 x208
> cell: 1.609.577.1600
> twitter: @nattyice <http://www.twitter.com/nattyice>

Re: Possible to delete a specific cell?

Posted by Ted Yu <yu...@gmail.com>.
Can you reference the suggestion (where it came from), if possible ?

On Thu, Mar 7, 2013 at 9:55 AM, Jonathan Natkins <na...@wibidata.com> wrote:

> It was suggested to me that there might be a way to delete a cell in a
> column for a particular timestamp, without masking all older values. Is
> this true? Or have I been fed lies?
>
> Thanks!
> Natty
>
> --
> http://www.wibidata.com
> office: 1.415.496.9424 x208
> cell: 1.609.577.1600
> twitter: @nattyice <http://www.twitter.com/nattyice>
>