You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jonathan Gray (JIRA)" <ji...@apache.org> on 2011/09/22 22:40:26 UTC

[jira] [Created] (HBASE-4460) Support running an embedded ThriftServer within a RegionServer

Support running an embedded ThriftServer within a RegionServer
--------------------------------------------------------------

                 Key: HBASE-4460
                 URL: https://issues.apache.org/jira/browse/HBASE-4460
             Project: HBase
          Issue Type: New Feature
          Components: regionserver, thrift
            Reporter: Jonathan Gray
            Assignee: Jonathan Gray


Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.

This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4460) Support running an embedded ThriftServer within a RegionServer

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

Ted Yu commented on HBASE-4460:
-------------------------------

w.r.t. Lars' comment, how about using the following code to obtain HRegionLocation ?
{code}
    this.connection = HConnectionManager.getConnection(this.conf);
...
    HRegionLocation location = connection.locateRegion(tableName.array(),
      HRegionInfo.createRegionName(tableName.array(), null, HConstants.NINES, false));
{code}
                
> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
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-4460) Support running an embedded ThriftServer within a RegionServer

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

Gary Helmling commented on HBASE-4460:
--------------------------------------

Also just to second what Andy said for longer-term, we'll still want to somehow provide SASL auth for thrift clients, with the thrift server acting as a proxy on their behalf, but that seems a much bigger project.

> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (HBASE-4460) Support running an embedded ThriftServer within a RegionServer

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

Jonathan Gray resolved HBASE-4460.
----------------------------------

      Resolution: Fixed
    Release Note: Run a ThriftServer embedded within a RegionServer process by setting "hbase.regionserver.export.thrift" to true.
    Hadoop Flags: Reviewed

Committed to trunk.  Thanks for the reviews LarsH and KarthikR.

Opened HBASE-4631 to implement some of your suggestions.
                
> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
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-4460) Support running an embedded ThriftServer within a RegionServer

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

Andrew Purtell commented on HBASE-4460:
---------------------------------------

This is possibly a first step toward replacing HRPC with Thrift. Your thoughts there, please.

If so, we should consider bringing the capability to wrap sockets with SASL into the ThriftServer.

> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4460) Support running an embedded ThriftServer within a RegionServer

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

Jonathan Gray updated HBASE-4460:
---------------------------------

    Fix Version/s: 0.94.0

New feature, only going to trunk.
                
> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>             Fix For: 0.94.0
>
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
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-4460) Support running an embedded ThriftServer within a RegionServer

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

Jonathan Gray commented on HBASE-4460:
--------------------------------------

Replacing HRPC is another story but I think many of us are in agreement that we'd like to do that eventually.  The scope here is much smaller and I'm working on a set of changes to allow fat Thrift-based clients, not necessarily replacing normal HRPC.

Open to your feedback on what I can do to better integrate with security stuff but not sure what I can do at this point.

> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4460) Support running an embedded ThriftServer within a RegionServer

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

jiraposter@reviews.apache.org commented on HBASE-4460:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2410/
-----------------------------------------------------------

Review request for hbase, Dhruba Borthakur, Gary Helmling, Michael Stack, and Andrew Purtell.


Summary
-------

Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer. This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop. This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.


This addresses bug HBASE-4460.
    https://issues.apache.org/jira/browse/HBASE-4460


Diffs
-----

  /src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java 1174376 
  /src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 1174376 
  /src/main/java/org/apache/hadoop/hbase/regionserver/HRegionThriftServer.java PRE-CREATION 

Diff: https://reviews.apache.org/r/2410/diff


Testing
-------

Running this already on our hbase-92-based branch and running test site.


Thanks,

Jonathan


                
> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
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-4460) Support running an embedded ThriftServer within a RegionServer

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

jiraposter@reviews.apache.org commented on HBASE-4460:
------------------------------------------------------



bq.  On 2011-10-20 00:34:31, Karthik Ranganathan wrote:
bq.  > Looks good to me, one minor nit... +1

Thanks for reviews guys.  I'm going to file a follow-up JIRA to deal with your comments (cleanup and optimize).


- Jonathan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2410/#review2689
-----------------------------------------------------------


On 2011-10-17 22:37:43, Jonathan Gray wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2410/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-10-17 22:37:43)
bq.  
bq.  
bq.  Review request for hbase, Dhruba Borthakur, Gary Helmling, Michael Stack, and Andrew Purtell.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer. This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop. This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
bq.  
bq.  
bq.  This addresses bug HBASE-4460.
bq.      https://issues.apache.org/jira/browse/HBASE-4460
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java 1174376 
bq.    /src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 1174376 
bq.    /src/main/java/org/apache/hadoop/hbase/regionserver/HRegionThriftServer.java PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/2410/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Running this already on our hbase-92-based branch and running test site.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jonathan
bq.  
bq.


                
> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
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-4460) Support running an embedded ThriftServer within a RegionServer

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

Gary Helmling commented on HBASE-4460:
--------------------------------------

.bq Open to your feedback on what I can do to better integrate with security stuff but not sure what I can do at this point.

For the current patch on HBASE-4099, I think not much other than make sure we have a way of flagging that the ThriftServer is embedded so we skip the login.  Though in that case I can't picture wanting to do embedded thrift + security at the same time, since all thrift clients would have effective access as the region server process user (circumventing security).

The embedded thrift server + login + security might all work together if we:
* add a User.loginAndReturnUser() variant that delegates to UserGroupInformation.loginUserFromKeytabAndReturnUGI(), then returns a wrapping User instance
* call this method on startup for the embedded thrift server to get the thrift user instance
* use User.runAs() to execute the body of HRegionThriftServer.run() as the logged in thrift user

In any case, all of that seems like it should go in a separate JIRA.

> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4460) Support running an embedded ThriftServer within a RegionServer

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

Jonathan Gray commented on HBASE-4460:
--------------------------------------

Gary, want to open another JIRA and link it here?

> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4460) Support running an embedded ThriftServer within a RegionServer

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

stack commented on HBASE-4460:
------------------------------

@Gary I wonder if thrift doesn't have this already?

> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4460) Support running an embedded ThriftServer within a RegionServer

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

Hudson commented on HBASE-4460:
-------------------------------

Integrated in HBase-TRUNK #2344 (See [https://builds.apache.org/job/HBase-TRUNK/2344/])
    HBASE-4460  Support running an embedded ThriftServer within a RegionServer (jgray)

jgray : 
Files : 
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionThriftServer.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java

                
> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>             Fix For: 0.94.0
>
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
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-4460) Support running an embedded ThriftServer within a RegionServer

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

Jonathan Gray updated HBASE-4460:
---------------------------------

    Attachment: HBASE-4460-v1.patch

Adds {{HRegionThriftServer}}, a RegionServer hosted ThriftServer.  Default is off, can be turned on with "hbase.regionserver.export.thrift" set to true.

> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4460) Support running an embedded ThriftServer within a RegionServer

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

jiraposter@reviews.apache.org commented on HBASE-4460:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2410/#review2689
-----------------------------------------------------------


Looks good to me, one minor nit... +1


/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionThriftServer.java
<https://reviews.apache.org/r/2410/#comment6066>

    Just a code-readability comment - could we structure as:
    
    Get get = new Get(row);
    get.setTimeRange(Long.MIN_VALUE, timestamp);
    
    if (columns != null) {
      // ...
    }
    
    Result result = rs.get(regionName, get);
    return ThriftUtilities.rowResultFromHBase(result);
    


- Karthik


On 2011-10-17 22:37:43, Jonathan Gray wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2410/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-10-17 22:37:43)
bq.  
bq.  
bq.  Review request for hbase, Dhruba Borthakur, Gary Helmling, Michael Stack, and Andrew Purtell.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer. This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop. This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
bq.  
bq.  
bq.  This addresses bug HBASE-4460.
bq.      https://issues.apache.org/jira/browse/HBASE-4460
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java 1174376 
bq.    /src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 1174376 
bq.    /src/main/java/org/apache/hadoop/hbase/regionserver/HRegionThriftServer.java PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/2410/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Running this already on our hbase-92-based branch and running test site.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jonathan
bq.  
bq.


                
> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
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-4460) Support running an embedded ThriftServer within a RegionServer

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

Jonathan Gray commented on HBASE-4460:
--------------------------------------

Since security stuff can be dealt with in a separate JIRA, what do people think of the patch I have up?  Shall I submit to rb?

> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4460) Support running an embedded ThriftServer within a RegionServer

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

jiraposter@reviews.apache.org commented on HBASE-4460:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2410/#review2640
-----------------------------------------------------------


This makes much more sense than having to run a separate thrift server.


/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionThriftServer.java
<https://reviews.apache.org/r/2410/#comment5945>

    I think we're no longer supposed to put the copyright notice with year in, but just the license grant.



/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionThriftServer.java
<https://reviews.apache.org/r/2410/#comment5948>

    I wish there'd be a more lightweight way to do this. I know these are cached in BaseHandler, but each HTable will have it's ThreadPoolExecutor, etc, and having these "inside" RegionServer just to get the regionname seems wasteful.
    In fact this will establish another request to the same regionserver again, if it wasn't in the cache.
    
    On the other hand I don't see an easy way to avoid this...
    Maybe the RegionServer itself could provide a facility to find a region it manages by table/row, but that different from how HBae operates normally... (for another jira)
    


- Lars


On 2011-10-17 22:37:43, Jonathan Gray wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2410/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-10-17 22:37:43)
bq.  
bq.  
bq.  Review request for hbase, Dhruba Borthakur, Gary Helmling, Michael Stack, and Andrew Purtell.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer. This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop. This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
bq.  
bq.  
bq.  This addresses bug HBASE-4460.
bq.      https://issues.apache.org/jira/browse/HBASE-4460
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java 1174376 
bq.    /src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 1174376 
bq.    /src/main/java/org/apache/hadoop/hbase/regionserver/HRegionThriftServer.java PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/2410/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Running this already on our hbase-92-based branch and running test site.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jonathan
bq.  
bq.


                
> Support running an embedded ThriftServer within a RegionServer
> --------------------------------------------------------------
>
>                 Key: HBASE-4460
>                 URL: https://issues.apache.org/jira/browse/HBASE-4460
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver, thrift
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>         Attachments: HBASE-4460-v1.patch
>
>
> Rather than a separate process, it can be advantageous in some situations for each RegionServer to embed their own ThriftServer.  This allows each embedded ThriftServer to short-circuit any queries that should be executed on the local RS and skip the extra hop.  This then enables the building of fat Thrift clients that cache region locations and avoid extra hops all together.
> This JIRA is just about the embedded ThriftServer.  Will open others for the rest.

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