Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-2609

Harmonize the Get and Delete operations

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0, 0.99.2
    • Component/s: Client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Align Delete class with Get class. Change all delete* method names to add* instead. For example, change deleteColumn to addColumn (as in add-this-column to the Delete specification). Deprecate the old.

      Description

      In my work on HBASE-2400, implementing deletes for the Avro server felt quite awkward. Rather than the clean API of the Get object, which allows restrictions on the result set from a row to be expressed with addColumn, addFamily, setTimeStamp, setTimeRange, setMaxVersions, and setFilters, the Delete object hides these semantics behind various constructors to deleteColumn[s] an deleteFamily. From my naive vantage point, I see no reason why it would be a bad idea to mimic the Get API exactly, though I could quite possibly be missing something. Thoughts?

      1. 2609v2.txt
        7 kB
        stack
      2. 2609.txt
        6 kB
        stack

        Issue Links

          Activity

          Hide
          apurtell Andrew Purtell added a comment -

          Still relevant. We should harmonize the Get and Delete operations. It should be possible to construct a Get that selects the exact same set of cells as a Delete.

          Show
          apurtell Andrew Purtell added a comment - Still relevant. We should harmonize the Get and Delete operations. It should be possible to construct a Get that selects the exact same set of cells as a Delete.
          Hide
          stack stack added a comment -

          Changes all delete* to add* so like Get. Deprecates the old method names in favor of the new.

          Show
          stack stack added a comment - Changes all delete* to add* so like Get. Deprecates the old method names in favor of the new.
          Hide
          stack stack added a comment -

          Fix class javadoc to refer to new means.

          Show
          stack stack added a comment - Fix class javadoc to refer to new means.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12676844/2609v2.txt
          against trunk revision .
          ATTACHMENT ID: 12676844

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. The patch doesn't appear to include any new or modified tests.
          Please justify why no new tests are needed for this patch.
          Also please list what manual steps were performed to verify this patch.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 checkstyle. The applied patch does not increase the total number of checkstyle errors

          +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 lineLengths. The patch does not introduce lines longer than 100

          +1 site. The mvn site goal succeeds with this patch.

          +1 core tests. The patch passed unit tests in .

          Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html
          Checkstyle Errors: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/checkstyle-aggregate.html

          Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12676844/2609v2.txt against trunk revision . ATTACHMENT ID: 12676844 +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 checkstyle . The applied patch does not increase the total number of checkstyle errors +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 lineLengths . The patch does not introduce lines longer than 100 +1 site . The mvn site goal succeeds with this patch. +1 core tests . The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html Checkstyle Errors: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//artifact/patchprocess/checkstyle-aggregate.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/11460//console This message is automatically generated.
          Hide
          stack stack added a comment -

          Andrew Purtell what you think? Enis Soztutar for branch-1?

          Show
          stack stack added a comment - Andrew Purtell what you think? Enis Soztutar for branch-1?
          Hide
          apurtell Andrew Purtell added a comment - - edited

          Looks fine but if you put it in 0.98 the javadoc needs a small update to the @deprecated text.

          Show
          apurtell Andrew Purtell added a comment - - edited Looks fine but if you put it in 0.98 the javadoc needs a small update to the @deprecated text.
          Hide
          stack stack added a comment -

          Thanks Andrew Purtell Not for 0.98. Waiting on @enis input for branch-1.
          St.Ack

          Show
          stack stack added a comment - Thanks Andrew Purtell Not for 0.98. Waiting on @enis input for branch-1. St.Ack
          Hide
          enis Enis Soztutar added a comment -

          Wow an old one. Patch looks good for branch-1. Do we need an interface to hold addColumn() methods? We have Mutate and Query for write and read ops respectively, but this covers a Get/Scan and Delete. Can do in another issue.

          Show
          enis Enis Soztutar added a comment - Wow an old one. Patch looks good for branch-1. Do we need an interface to hold addColumn() methods? We have Mutate and Query for write and read ops respectively, but this covers a Get/Scan and Delete. Can do in another issue.
          Hide
          stack stack added a comment -

          Across Scan, Get, and Delete addFamily/addColumn/setTimestamp, there is not enough coherency to make an Interface – what to cal it? Delete has addColumns vs addColumn and sometimes on addColumn it takes a timestamp, sometimes not.

          I always thought Get and Delete should be the same since about specifying coordinates. Could work on this in another issue.

          Let me commit this for now.

          Show
          stack stack added a comment - Across Scan, Get, and Delete addFamily/addColumn/setTimestamp, there is not enough coherency to make an Interface – what to cal it? Delete has addColumns vs addColumn and sometimes on addColumn it takes a timestamp, sometimes not. I always thought Get and Delete should be the same since about specifying coordinates. Could work on this in another issue. Let me commit this for now.
          Hide
          stack stack added a comment -

          Thanks for reviews. Committed to branch-1+

          Show
          stack stack added a comment - Thanks for reviews. Committed to branch-1+
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in HBase-TRUNK #5703 (See https://builds.apache.org/job/HBase-TRUNK/5703/)
          HBASE-2609 Harmonize the Get and Delete operations (stack: rev 1d6c4678bb7964af34fb42a6c8bbf0553880bba3)

          • hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in HBase-TRUNK #5703 (See https://builds.apache.org/job/HBase-TRUNK/5703/ ) HBASE-2609 Harmonize the Get and Delete operations (stack: rev 1d6c4678bb7964af34fb42a6c8bbf0553880bba3) hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in HBase-1.0 #362 (See https://builds.apache.org/job/HBase-1.0/362/)
          HBASE-2609 Harmonize the Get and Delete operations (stack: rev 3fa96fb3c78b5561ca55b286a7019e11e9d365f0)

          • hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in HBase-1.0 #362 (See https://builds.apache.org/job/HBase-1.0/362/ ) HBASE-2609 Harmonize the Get and Delete operations (stack: rev 3fa96fb3c78b5561ca55b286a7019e11e9d365f0) hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java
          Hide
          enis Enis Soztutar added a comment -

          Closing this issue after 0.99.2 release.

          Show
          enis Enis Soztutar added a comment - Closing this issue after 0.99.2 release.

            People

            • Assignee:
              stack stack
              Reporter:
              hammer Jeff Hammerbacher
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development