hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mubarak Seyed (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-4720) Implement atomic update operations (checkAndPut, checkAndDelete) for REST client/server
Date Sat, 17 Dec 2011 03:30:31 GMT

    [ https://issues.apache.org/jira/browse/HBASE-4720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13171436#comment-13171436

Mubarak Seyed commented on HBASE-4720:

Thanks Ted. This is what i think about refactoring the TableResource and CheckAndXXXXResource.

I can't extend from TableResource as WebContainer ends up look for @Path in TableResource
after calling super(table) in CheckAndXXXXResource, which causes web container to throw incorrect
URI exception. 

Even if i make some of the methods (scanTransformAttrs) to static, it breaks on variables

I think we need a superClass for both TableResource and CheckAndXXXXResource, which can carry
most of the methods (scanTransformAttrs, getTransform, setTransform, tranform), it would look

public class BasicResource extends ResourceBase{

   -- All the common methods --

public class TableResource extends BasicResource{


public class CheckAndXXXXResource extends BasicResource{



OR we can move all the common methods to ResourceBase and we can have overloaded constructor
to send table name, like

public ResourceBase(String table){


public ResourceBase(){


so that all other resource classes (such as VersionResource, SchemaResource, etc) does not
need to change.

I am just hacking the code with option #2 (moving methods to ResourceBase), will test it out,
post them on review board then wait for comments.

> Implement atomic update operations (checkAndPut, checkAndDelete) for REST client/server

> ----------------------------------------------------------------------------------------
>                 Key: HBASE-4720
>                 URL: https://issues.apache.org/jira/browse/HBASE-4720
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Daniel Lord
>         Attachments: HBASE-4720.v1.patch
> I have several large application/HBase clusters where an application node will occasionally
need to talk to HBase from a different cluster.  In order to help ensure some of my consistency
guarantees I have a sentinel table that is updated atomically as users interact with the system.
 This works quite well for the "regular" hbase client but the REST client does not implement
the checkAndPut and checkAndDelete operations.  This exposes the application to some race
conditions that have to be worked around.  It would be ideal if the same checkAndPut/checkAndDelete
operations could be supported by the REST client.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message