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 25FD3200BE4 for ; Wed, 21 Dec 2016 18:35:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 23027160B26; Wed, 21 Dec 2016 17:35:00 +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 6A7A9160B18 for ; Wed, 21 Dec 2016 18:34:59 +0100 (CET) Received: (qmail 46066 invoked by uid 500); 21 Dec 2016 17:34:58 -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 46046 invoked by uid 99); 21 Dec 2016 17:34:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2016 17:34:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5A0572C03DE for ; Wed, 21 Dec 2016 17:34:58 +0000 (UTC) Date: Wed, 21 Dec 2016 17:34:58 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-17345) Implement batch MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 21 Dec 2016 17:35:00 -0000 [ https://issues.apache.org/jira/browse/HBASE-17345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15767632#comment-15767632 ] stack commented on HBASE-17345: ------------------------------- {code} .... 72 * And the {@link #maxAttempts} is a limit for each single operation in the batch logically. In the 73 * implementation, we will record a {@code tries} parameter for each operation group, and if it is 74 * split to several groups when retrying, the sub groups will inherit the {@code tries}. You can 75 * imagine that the whole retrying process is a tree, and the {@link #maxAttempts} is the limit of 76 * the depth of the tree. 77 */ {code} Trying to understand, the tree will only have a depth of one; i.e. a branch for each regionserver the batch is going against? Each branch can run up its own maxAttempts? The tries is not shared amongst the branches? Regardless of how many retries, the operation will stop after operationTimeoutNs? If so, sounds good. It has to be an Impl in the below, it can't be Interface? private final AsyncConnectionImpl conn; What is up w/ below? this.startLogErrorsCnt = 0;// startLogErrorsCnt; We take startLogErrorsCnt as a param but ignore it? You make a new Action from passed-in Action because you don't want to modify passed-in params? 139 Action action = new Action(rawAction, i); super nit: you can presize the following 148 this.action2Errors = new IdentityHashMap<>(); Perhaps if TRACE-level logging, log every attempt: 164 if (tries > startLogErrorsCnt) { ? Is it right to set this to WARN since it might succeed on next attempt? LOG.warn("Process batch for " ... maybe I'm reading it wrong though? nit: give this method a better name: 174 private String getExtras(ServerName serverName) { 175 return serverName != null ? serverName.getServerName() : ""; 176 } YOu should use the above method here? 4 serverName != null ? serverName.toString() : "")); This is just to log? 208 long currentTime = System.currentTimeMillis(); i.e. all timing is with nanos but millis is just for logging? This is a crazy amount of work! I like how this patch is getting better on each iteration; i.e. public MultiGetCallerBuilder multiGet() { becomes public BatchCallerBuilder batch() { Skimmed after reading 1/4. What do you see AsyncBatchRpcRetryingCaller replacing in our current stack? It seems to do AP and a bunch of our Callable infra. Should AsyncBatchRpcRetryingCaller implement Callable? Or what you thinking? Generally no * imports 1 import static org.apache.hadoop.hbase.client.ConnectionUtils.*; Why we have AsyncTable and AsyncTableBase again? Do we have to have the two Interfaces? Do you have to rename TestAsyncGetMultiThread ? And/or TestAsyncTableMultiGet? This is nice work > Implement batch > --------------- > > Key: HBASE-17345 > URL: https://issues.apache.org/jira/browse/HBASE-17345 > Project: HBase > Issue Type: Sub-task > Components: asyncclient, Client > Affects Versions: 2.0.0 > Reporter: Duo Zhang > Assignee: Duo Zhang > Fix For: 2.0.0 > > Attachments: HBASE-17345.patch > > > Add the support for general batch based on the code introduced in HBASE-17142. -- This message was sent by Atlassian JIRA (v6.3.4#6332)