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

Hadoop QA commented on HBASE-19043:
-----------------------------------

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m  
0s{color} | {color:blue} Docker mode activated. {color} |
| {color:red}-1{color} | {color:red} docker {color} | {color:red}  0m 
19s{color} | {color:red} Docker failed to build yetus/hbase:4a7b430. {color} |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Issue | HBASE-19043 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12893080/HBASE-19043.master.002.patch
 |
| Console output | 
https://builds.apache.org/job/PreCommit-HBASE-Build/9224/console |
| Powered by | Apache Yetus 0.4.0   http://yetus.apache.org |


This message was automatically generated.



> Purge TableWrapper and CoprocessorHConnnection
> ----------------------------------------------
>
>                 Key: HBASE-19043
>                 URL: https://issues.apache.org/jira/browse/HBASE-19043
>             Project: HBase
>          Issue Type: Task
>          Components: Coprocessors
>            Reporter: stack
>            Assignee: stack
>             Fix For: 2.0.0-alpha-4
>
>         Attachments: HBASE-19043.master.001.patch, 
> HBASE-19043.master.002.patch
>
>
> Repeating note from dev list today which had assent from [~apurtell] and 
> [~appy]:
> {code}
> Subject: [DISCUSS] Punt the Coprocessor TableWrapper and 
> CoprocessorHConnection?
> To: HBase Dev List <d...@hbase.apache.org>
> tl;dr I believe the original intent for TableWrapper and
> CoprocessorHConnection can now be gotten elsewhere so we should purge these
> classes.
> In base CoprocessorEnvironment, there are methods to return a Table
> instance. There are none to return an Admin. In our code base, the only
> user is the AccessController. Phoenix uses it twice in its Indexer
> implementation.
> When you call CE#getTable, the default implementation in
> BaseEnvironemnt calls HTableWrapper.createWrapper which takes a
> BaseEnvironment List in which we keep all Table instances. On shutdown of
> the coprocessor, the list is iterated and all tables are closed.
> Going via TableWrapper, the class comment says:
> * A wrapper for HTable. Can be used to restrict privilege.
> *
> * Currently it just helps to track tables opened by a Coprocessor and
> * facilitate close of them if it is aborted.
> *
> * We also disallow row locking.
> *
> * There is nothing now that will stop a coprocessor from using HTable
> * objects directly instead of this API, but in the future we intend to
> * analyze coprocessor implementations as they are loaded and reject those
> * which attempt to use objects and methods outside the Environment
> * sandbox.
> TableWrapper by my reading delegates all calls to a Table instance with no
> interception (there is not rowlocking to override anymore). On open, we do
> ensure the Table is up on a CoprocessorHConnection which does the following:
> * Connection to an HTable from within a Coprocessor. We can do some
> nice tricks since we know we
> * are on a regionserver, for instance skipping the full
> serialization/deserialization of objects
> * when talking to the server.
> The above 'trick' is now commonplace in servers as the Master and
> RegionServer always make Connections that will short-circuit if an
> opportunity.
> As I read TableWrapper and CoprocessorHConnection, they were written at
> another time when Table construction was heavyweight and Table#close was
> not expected of clients and before the introduction of the general
> Server-side short-circuit Connection facility.
> Unless objection, I think we should purge them.
> Writing here in case I'm missing some key facility they provide.
> {code}
> See 
> http://search-hadoop.com/m/HBase/YGbb8uCtg26VkBy?subj=+DISCUSS+Punt+the+Coprocessor+TableWrapper+and+CoprocessorHConnection+
> This issue is about removing these classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to