Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 48D02200D31 for ; Fri, 20 Oct 2017 20:18:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 476F91609ED; Fri, 20 Oct 2017 18:18:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 93439160BCB for ; Fri, 20 Oct 2017 20:18:06 +0200 (CEST) Received: (qmail 45583 invoked by uid 500); 20 Oct 2017 18:18:05 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 45540 invoked by uid 99); 20 Oct 2017 18:18:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Oct 2017 18:18:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E482FC10B3 for ; Fri, 20 Oct 2017 18:18:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id xupizMsEixxT for ; Fri, 20 Oct 2017 18:18:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 0A5C45FCD4 for ; Fri, 20 Oct 2017 18:18:03 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D50DBE0FA2 for ; Fri, 20 Oct 2017 18:18:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2E0062438E for ; Fri, 20 Oct 2017 18:18:01 +0000 (UTC) Date: Fri, 20 Oct 2017 18:18:01 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-19043) Purge TableWrapper and CoprocessorHConnnection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 20 Oct 2017 18:18:07 -0000 [ https://issues.apache.org/jira/browse/HBASE-19043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] stack updated HBASE-19043: -------------------------- Resolution: Fixed Hadoop Flags: Reviewed Status: Resolved (was: Patch Available) Pushed to master and branch-2. Ran failed test locally a few times and passes. Checked out what tests did run and seems like all. Thanks [~anoop.hbase] for review. > 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, HBASE-19043.master.003.patch, HBASE-19043.master.004.patch, HBASE-19043.master.005.patch, HBASE-19043.master.006.patch, HBASE-19043.master.007.patch, HBASE-19043.master.007.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 > 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)