HBase
  1. HBase
  2. HBASE-8029

delete with TS should only delete that cell, not all cells after.

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Client, shell
    • Labels:
      None

      Description

      delete with TS specified will delete all older cells. I know overloading the cells is not a great model, but sometimes it is useful and you don't want to delete all old cells.

      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

        Activity

        Hide
        ramkrishna.s.vasudevan added a comment -

        Okie. I just saw Lars comment in the JIRA about the shell support. Replied on the mailing list the same.

        Show
        ramkrishna.s.vasudevan added a comment - Okie. I just saw Lars comment in the JIRA about the shell support. Replied on the mailing list the same.
        Hide
        Lars Hofhansl added a comment -

        What Kevin is saying is that from the it is currently not possible to delete a specific version of a column because the shell cannot set version delete markers. He is right.

        The reason is that unlike the Java API the shell does not let you specify the type of the delete marker to set.

        Show
        Lars Hofhansl added a comment - What Kevin is saying is that from the it is currently not possible to delete a specific version of a column because the shell cannot set version delete markers. He is right. The reason is that unlike the Java API the shell does not let you specify the type of the delete marker to set.
        Hide
        Sergey Shelukhin added a comment -

        Current delete timestamp acts the same as put timestamp, and that seems logical to me, so it's not a bug.
        If you put a put with a later ts, it supercedes the previous ones, and delete works the same way...

        Show
        Sergey Shelukhin added a comment - Current delete timestamp acts the same as put timestamp, and that seems logical to me, so it's not a bug. If you put a put with a later ts, it supercedes the previous ones, and delete works the same way...
        Hide
        Lars Hofhansl added a comment -

        There are serveral aspects here.

        1. there are three different types of delete markers: family, column, version
        2. the delete can have a timestamp, which determines at which time that delete takes effect

        The shell currently places column delete markers, hence those markers affect all versions of the column prior to the markers timestamp.

        We can enhance the shell to indicate the delete marker type, but the current default behavior should not change.

        Show
        Lars Hofhansl added a comment - There are serveral aspects here. there are three different types of delete markers: family, column, version the delete can have a timestamp, which determines at which time that delete takes effect The shell currently places column delete markers, hence those markers affect all versions of the column prior to the markers timestamp. We can enhance the shell to indicate the delete marker type, but the current default behavior should not change.
        Hide
        Ted Yu added a comment -

        This was filed as a Bug.
        Should this be a feature ?

        Show
        Ted Yu added a comment - This was filed as a Bug. Should this be a feature ?

          People

          • Assignee:
            Unassigned
            Reporter:
            Kevin Odell
          • Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:

              Development