You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Lars Hofhansl (JIRA)" <ji...@apache.org> on 2012/08/07 19:42:10 UTC

[jira] [Created] (HBASE-6522) Expose locks and leases to Coprocessors

Lars Hofhansl created HBASE-6522:
------------------------------------

             Summary: Expose locks and leases to Coprocessors
                 Key: HBASE-6522
                 URL: https://issues.apache.org/jira/browse/HBASE-6522
             Project: HBase
          Issue Type: Bug
            Reporter: Lars Hofhansl
            Assignee: Lars Hofhansl


Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).

In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.

Here I propose two trivial changes:
# Make HRegion.getLock public
# Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)


--
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

        

[jira] [Commented] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13430858#comment-13430858 ] 

ramkrishna.s.vasudevan commented on HBASE-6522:
-----------------------------------------------

+1.
                
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>         Attachments: 6522-v2.txt, 6522.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
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

        

[jira] [Commented] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439503#comment-13439503 ] 

Hudson commented on HBASE-6522:
-------------------------------

Integrated in HBase-0.94-security #48 (See [https://builds.apache.org/job/HBase-0.94-security/48/])
    HBASE-6522 Expose locks and leases to Coprocessors (Revision 1371026)

     Result = FAILURE
larsh : 
Files : 
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServerServices.java
* /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
* /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/util/MockRegionServerServices.java

                
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6522.txt, 6522-v2.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
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

        

[jira] [Resolved] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl resolved HBASE-6522.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.94.2
                   0.96.0
     Hadoop Flags: Reviewed

At the same time we can tackle this in another jira when it turns out to actually be a problem. As it stands in 0.94 all leases take default leasePeriod configured for this region server.
                
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6522-v2.txt, 6522.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
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

        

[jira] [Commented] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13430792#comment-13430792 ] 

Lars Hofhansl commented on HBASE-6522:
--------------------------------------

Going to commit soon if nobody objects to the new API(s) exposed to CPs.
                
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>         Attachments: 6522-v2.txt, 6522.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
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

        

[jira] [Commented] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431750#comment-13431750 ] 

Hudson commented on HBASE-6522:
-------------------------------

Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #127 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/127/])
    HBASE-6522 Expose locks and leases to Coprocessors (Revision 1371024)

     Result = FAILURE
larsh : 
Files : 
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServerServices.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockRegionServer.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MockRegionServerServices.java

                
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6522-v2.txt, 6522.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
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

        

[jira] [Commented] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13430790#comment-13430790 ] 

Lars Hofhansl commented on HBASE-6522:
--------------------------------------

BTW. this also came up in an internal Salesforce discussion and we need something the leases for some internal use cases.
                
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>         Attachments: 6522-v2.txt, 6522.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
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

        

[jira] [Updated] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl updated HBASE-6522:
---------------------------------

    Attachment: 6522.txt

Trivial patch that does just that.
                
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>         Attachments: 6522.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
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

        

[jira] [Commented] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13430488#comment-13430488 ] 

stack commented on HBASE-6522:
------------------------------

The getLeases has to be added to RegionServerServices?  Otherwise +1 on patch.
                
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>         Attachments: 6522.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
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

        

[jira] [Commented] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13430503#comment-13430503 ] 

Lars Hofhansl commented on HBASE-6522:
--------------------------------------

@Stack: Yep, because that is all a RegionObserver can see (through the RegionCoprocessorEnvironment). I think it also makes sense, because it is a service provided by the RegionServer.
                
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>         Attachments: 6522.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
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

        

[jira] [Updated] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl updated HBASE-6522:
---------------------------------

    Issue Type: Improvement  (was: Bug)
    
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6522.txt, 6522-v2.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13430672#comment-13430672 ] 

stack commented on HBASE-6522:
------------------------------

@Lars OK boss
                
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>         Attachments: 6522.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
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

        

[jira] [Updated] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl updated HBASE-6522:
---------------------------------

    Attachment: 6522-v2.txt

V2 also fixes up the mock implementations of RSServices and add some simple test code
(which just makes sure that getLeases() and getLock(...) is accessible and can be called from a RegionObserver implementation).
                
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>         Attachments: 6522-v2.txt, 6522.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
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

        

[jira] [Commented] (HBASE-6522) Expose locks and leases to Coprocessors

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13448328#comment-13448328 ] 

Hudson commented on HBASE-6522:
-------------------------------

Integrated in HBase-0.94-security-on-Hadoop-23 #7 (See [https://builds.apache.org/job/HBase-0.94-security-on-Hadoop-23/7/])
    HBASE-6522 Expose locks and leases to Coprocessors (Revision 1371026)

     Result = FAILURE
larsh : 
Files : 
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServerServices.java
* /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
* /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/util/MockRegionServerServices.java

                
> Expose locks and leases to Coprocessors
> ---------------------------------------
>
>                 Key: HBASE-6522
>                 URL: https://issues.apache.org/jira/browse/HBASE-6522
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6522.txt, 6522-v2.txt
>
>
> Currently it is not possible for CP to implement any of checkAndMutate type operations, because coprocessor have no way create a lock, because getLock is private HRegion (interestingly ReleaseLock is public).
> In addition it would nice if Coprocessor could hook into the RegionServers' Lease management.
> Here I propose two trivial changes:
> # Make HRegion.getLock public
> # Add {code}Leases getLeases(){code} to RegionServerServices (and hence to HRegionServer)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira