You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Todd Lipcon <to...@cloudera.com> on 2010/05/25 21:22:03 UTC

Review Request: HBASE-2579. Add atomic checkAndDelete support

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.hbase.org/r/84/
-----------------------------------------------------------

Review request for hbase.


Summary
-------

Submitting to RB on behalf of Michael Dalton


This addresses bug HBASE-2579.


Diffs
-----

  trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java 946565 
  trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java 946565 
  trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java 946565 
  trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 946565 
  trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 946565 
  trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java 946565 
  trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java 946565 

Diff: http://review.hbase.org/r/84/diff


Testing
-------


Thanks,

Todd


Re: Review Request: HBASE-2579. Add atomic checkAndDelete support

Posted by Todd Lipcon <to...@cloudera.com>.

> On 2010-05-25 12:32:28, Todd Lipcon wrote:
> > Looks pretty good. The one thing I don't like is that checkAndMutate takes a Writable, and then downcasts based on instanceof. Can we extract a common interface between Put and Delete? maybe something like RowMutation or RowOperation, which would have getRowLock and a "performMutation()" or something? What do you guys think?
> 
> Ryan Rawson wrote:
>     I think we should address that in a different JIRA, just because its more of an API design.  This is one more API endpoint and that is more of a refactor.

Fair enough


- Todd


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.hbase.org/r/84/#review54
-----------------------------------------------------------


On 2010-05-25 12:22:03, Todd Lipcon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://review.hbase.org/r/84/
> -----------------------------------------------------------
> 
> (Updated 2010-05-25 12:22:03)
> 
> 
> Review request for hbase.
> 
> 
> Summary
> -------
> 
> Submitting to RB on behalf of Michael Dalton
> 
> 
> This addresses bug HBASE-2579.
> 
> 
> Diffs
> -----
> 
>   trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java 946565 
>   trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java 946565 
> 
> Diff: http://review.hbase.org/r/84/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Todd
> 
>


Re: Review Request: HBASE-2579. Add atomic checkAndDelete support

Posted by Ryan Rawson <ry...@gmail.com>.

> On 2010-05-25 12:32:28, Todd Lipcon wrote:
> > Looks pretty good. The one thing I don't like is that checkAndMutate takes a Writable, and then downcasts based on instanceof. Can we extract a common interface between Put and Delete? maybe something like RowMutation or RowOperation, which would have getRowLock and a "performMutation()" or something? What do you guys think?

I think we should address that in a different JIRA, just because its more of an API design.  This is one more API endpoint and that is more of a refactor.


- Ryan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.hbase.org/r/84/#review54
-----------------------------------------------------------


On 2010-05-25 12:22:03, Todd Lipcon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://review.hbase.org/r/84/
> -----------------------------------------------------------
> 
> (Updated 2010-05-25 12:22:03)
> 
> 
> Review request for hbase.
> 
> 
> Summary
> -------
> 
> Submitting to RB on behalf of Michael Dalton
> 
> 
> This addresses bug HBASE-2579.
> 
> 
> Diffs
> -----
> 
>   trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java 946565 
>   trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java 946565 
> 
> Diff: http://review.hbase.org/r/84/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Todd
> 
>


Re: Review Request: HBASE-2579. Add atomic checkAndDelete support

Posted by st...@duboce.net.

> On 2010-05-25 12:32:28, Todd Lipcon wrote:
> > Looks pretty good. The one thing I don't like is that checkAndMutate takes a Writable, and then downcasts based on instanceof. Can we extract a common interface between Put and Delete? maybe something like RowMutation or RowOperation, which would have getRowLock and a "performMutation()" or something? What do you guys think?
> 
> Ryan Rawson wrote:
>     I think we should address that in a different JIRA, just because its more of an API design.  This is one more API endpoint and that is more of a refactor.
> 
> Todd Lipcon wrote:
>     Fair enough

So, is this ready for commit? (we can address Todd comments on commit).  I can make an issue for common interface across Delete/Put.


- stack


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/84/#review54
-----------------------------------------------------------


On 2010-05-25 12:22:03, Todd Lipcon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://review.cloudera.org/r/84/
> -----------------------------------------------------------
> 
> (Updated 2010-05-25 12:22:03)
> 
> 
> Review request for hbase.
> 
> 
> Summary
> -------
> 
> Submitting to RB on behalf of Michael Dalton
> 
> 
> This addresses bug HBASE-2579.
>     http://issues.apache.org/jira/browse/HBASE-2579
> 
> 
> Diffs
> -----
> 
>   trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java 946565 
>   trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java 946565 
> 
> Diff: http://review.cloudera.org/r/84/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Todd
> 
>


Re: Review Request: HBASE-2579. Add atomic checkAndDelete support

Posted by Todd Lipcon <to...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.hbase.org/r/84/#review54
-----------------------------------------------------------


Looks pretty good. The one thing I don't like is that checkAndMutate takes a Writable, and then downcasts based on instanceof. Can we extract a common interface between Put and Delete? maybe something like RowMutation or RowOperation, which would have getRowLock and a "performMutation()" or something? What do you guys think?


trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
<http://review.hbase.org/r/84/#comment308>

    typo: executed



trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
<http://review.hbase.org/r/84/#comment309>

    since this modifies its parameter, I don't know that it makes sense to also return it. I'd make this void and add javadoc that it will mutate its arg (also explain what it does)


- Todd


On 2010-05-25 12:22:03, Todd Lipcon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://review.hbase.org/r/84/
> -----------------------------------------------------------
> 
> (Updated 2010-05-25 12:22:03)
> 
> 
> Review request for hbase.
> 
> 
> Summary
> -------
> 
> Submitting to RB on behalf of Michael Dalton
> 
> 
> This addresses bug HBASE-2579.
> 
> 
> Diffs
> -----
> 
>   trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java 946565 
>   trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java 946565 
> 
> Diff: http://review.hbase.org/r/84/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Todd
> 
>


Re: Review Request: HBASE-2579. Add atomic checkAndDelete support

Posted by Ryan Rawson <ry...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.hbase.org/r/84/#review58
-----------------------------------------------------------



trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
<http://review.hbase.org/r/84/#comment341>

    this is a somewhat reasonable compromise until one day we unify Put/Delete in an object hierarchy and fix up the API a bit.


- Ryan


On 2010-05-25 12:22:03, Todd Lipcon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://review.hbase.org/r/84/
> -----------------------------------------------------------
> 
> (Updated 2010-05-25 12:22:03)
> 
> 
> Review request for hbase.
> 
> 
> Summary
> -------
> 
> Submitting to RB on behalf of Michael Dalton
> 
> 
> This addresses bug HBASE-2579.
> 
> 
> Diffs
> -----
> 
>   trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 946565 
>   trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java 946565 
>   trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java 946565 
> 
> Diff: http://review.hbase.org/r/84/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Todd
> 
>