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 9267A200D4A for ; Tue, 14 Nov 2017 02:31:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 90E6D160BF3; Tue, 14 Nov 2017 01:31: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 D68D8160C06 for ; Tue, 14 Nov 2017 02:31:05 +0100 (CET) Received: (qmail 84637 invoked by uid 500); 14 Nov 2017 01:31: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 84624 invoked by uid 99); 14 Nov 2017 01:31:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2017 01:31:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1C1F118089D for ; Tue, 14 Nov 2017 01:31:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id VaDRpg1df_c6 for ; Tue, 14 Nov 2017 01:31: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 C275E5F5A5 for ; Tue, 14 Nov 2017 01:31: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 A0538E2590 for ; Tue, 14 Nov 2017 01:31: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 73A51240E6 for ; Tue, 14 Nov 2017 01:31:00 +0000 (UTC) Date: Tue, 14 Nov 2017 01:31:00 +0000 (UTC) From: "Appy (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-18978) Align the methods in Table and AsyncTable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 14 Nov 2017 01:31:06 -0000 [ https://issues.apache.org/jira/browse/HBASE-18978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16250637#comment-16250637 ] Appy commented on HBASE-18978: ------------------------------ bq. 'RawXXX' will execute the callbacks directly in the rpc framework thread, so it is a little dangerous for non-expert users as if you execute time-consuming tasks in the callback, the hbase client may be stuck. For the non-raw implementation, usually it is just a simple wrapper of the raw implementation. The difference is that, you need to provide a thread pool to execute the callbacks, so it will not block the rpc framework thread, which is safer for users. Okay, so if that's what 'raw' means, it totally makes sense. Like you have for admin - One interface and two implementations, one with separate threadpool and another with same thread pool (raw). AsyncAdmin <--- AsyncHBaseAdmin AsyncAdmin <--- RawAsyncHBaseAdmin That's clean and nice. bq. And for AsyncTable and RawAsyncTable, the scan API is a bit different. For RawAsyncTable there is a very low level observer style API. All other scan methods of async client are based on this API. It is not easy to write correct code with this API and I believe for most cases users do not need to use this method. This conflicts with above understanding of 'raw'. Going by previous meaning, there shouldn't be any 'raw' interfaces since that an implementation thing. Seems like 'raw' is being used for many things and that where the confusion arises. Can we either 1) Rename RawAsyncTable to something else, say, AdvancedAsyncTable, ExtendedAsyncTable or something else. Additionally, such advanced interface should extend basic interface for ease of use so that users using advanced one don't have to keep track of two interfaces/variables. OR 2) Merge it into AsyncTable: My personal preference, mainly because we shouldn't separate interfaces because 2 functions are "difficult to use" or less used. As long as we comment them properly, no dev will have trouble using/avoiding them, as appropriate. Thanks for the explanations Duo. What do you say about last point? > Align the methods in Table and AsyncTable > ----------------------------------------- > > Key: HBASE-18978 > URL: https://issues.apache.org/jira/browse/HBASE-18978 > Project: HBase > Issue Type: Task > Components: asyncclient, Client > Reporter: Duo Zhang > Assignee: Peter Somogyi > Priority: Critical > Fix For: 2.0.0-beta-1 > > -- This message was sent by Atlassian JIRA (v6.4.14#64029)