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 F2944200D1D for ; Sat, 14 Oct 2017 20:12:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F118B1609D5; Sat, 14 Oct 2017 18:12:06 +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 424EC1609CD for ; Sat, 14 Oct 2017 20:12:06 +0200 (CEST) Received: (qmail 35930 invoked by uid 500); 14 Oct 2017 18:12: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 35919 invoked by uid 99); 14 Oct 2017 18:12:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Oct 2017 18:12:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5CBA41A0394 for ; Sat, 14 Oct 2017 18:12:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id kG5KCUfqj49M for ; Sat, 14 Oct 2017 18:12:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id F29175FBE5 for ; Sat, 14 Oct 2017 18:12:02 +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 EE25AE0526 for ; Sat, 14 Oct 2017 18:12: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 CE2D124360 for ; Sat, 14 Oct 2017 18:12:00 +0000 (UTC) Date: Sat, 14 Oct 2017 18:12:00 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-19007) Align Services Interfaces in Master and RegionServer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 14 Oct 2017 18:12:07 -0000 [ https://issues.apache.org/jira/browse/HBASE-19007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16204766#comment-16204766 ] stack commented on HBASE-19007: ------------------------------- bq. Means the CP required things in RS side like getConnection() will be added to RegionServerCoprocessorEnvironment ? To satisfy need for getConnection, getConfiguration, isStopping, etc., we would do s/getRegionServices/getServer/ in RegionServerCoprocessorEnvironment and ditton in MasterCoprocessorEnvironment, we'd s/getMasterServices/getServer. The call to getServer would return the Server Interface. Server Interface would look mostly like the below: {code} // This Interface shines through MasterServices and RegionServerServices. They subclass it. // Be careful what you add here. Make sure it ok for CPs to have access else add elsewhere. @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC) public interface Server extends Abortable, Stoppable { Configuration getConfiguration(); ZooKeeperWatcher getZooKeeper(); Connection getConnection(); ServerName getServerName(); ChoreService getChoreService(); } {code} i.e. it would be changed to be IA.LP. The methods would be basically what is in the above with some minor edit. So, if you need to make a connection in your CP, you'd do env.getServer().getConnection(), etc. bq. But CPRSS now extend ImmutableOnlineRegions also and functions there will be needed by RS side hooks (Region level or RS level hooks) We can 1st list down what all needed at MS level, RS level, Region level and WAL level. We'd remove CPRSSS. Anything not available in Server, we'd instead make availalble as a method on RegionServerCoprocessorEnvironment. bq, I have a concern. This means we expose the APIs from Abortable and Stoppable which include calls to abort() and stop. This is valid. Server therefore needs an edit so it only exposes read-only aspects of Stoppable/Abortable. bq. I checked Phoenix code, they seem to call this in 2 or 3 places !! What a CP instead should do is throw some IOE from CP hook and make the config 'hbase.coprocessor.abortonerror' as true. (This is any way by def true only). Same with Stoppable also. Agree. Do we have to add an CoprocessorAbortException for CPs to throw? Let me redo the Master-side patch in accordance w/ this proposal. I'll edit Server so it only exposes read-only methods. Thanks [~anoop.hbase] > Align Services Interfaces in Master and RegionServer > ---------------------------------------------------- > > Key: HBASE-19007 > URL: https://issues.apache.org/jira/browse/HBASE-19007 > Project: HBase > Issue Type: Task > Reporter: stack > Priority: Blocker > > HBASE-18183 adds a CoprocessorRegionServerService to give a view on RegionServiceServices that is safe to expose to Coprocessors. > On the Master-side, MasterServices becomes an Interface for exposing to Coprocessors. > We need to align the two. > For background, see https://issues.apache.org/jira/browse/HBASE-12260?focusedCommentId=16203820&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16203820 -- This message was sent by Atlassian JIRA (v6.4.14#64029)