Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5AE19D0E8 for ; Thu, 6 Dec 2012 14:06:56 +0000 (UTC) Received: (qmail 43319 invoked by uid 500); 6 Dec 2012 14:06:54 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 43010 invoked by uid 500); 6 Dec 2012 14:06:54 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 42983 invoked by uid 99); 6 Dec 2012 14:06:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2012 14:06:53 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of harsh@cloudera.com designates 209.85.210.169 as permitted sender) Received: from [209.85.210.169] (HELO mail-ia0-f169.google.com) (209.85.210.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2012 14:06:46 +0000 Received: by mail-ia0-f169.google.com with SMTP id r4so5530768iaj.0 for ; Thu, 06 Dec 2012 06:06:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding:x-gm-message-state; bh=Sh+m4xLHT5OuijBixKsKUU5J/DThmv8mcnhxh63IdaU=; b=LuWPRs5i/bDkswrsBO3XNSyjOIYqHqte+i4O2dY2opbqYT5EXVea7RU9g0AEasMRw3 inOPAQD/3ieRNuo8CDQliIxkZ2lsh/obivfaUYF1ACMOZ50mD/hJRiLsTdlQts21Kjbo plIa5R/4pbqAEqXcQw8F1IGdOThlmKpAhjGsjcsNkxADCj4Zx/LKBZZlosLyOQ97Cvmt 5yd6ea0Z/UYa5PufwgCeELrJzWgwItxR4X3g44ybpeIoLpZm+SdxgHmN/yEVKuJqcB3L ES+ZLcQ7mim6A7gpmXD7bGd7u6/yCKM1C9uurFUk2dFkrSgIisp5VUUWr9Z7oZRLUfWS l0YA== Received: by 10.50.185.230 with SMTP id ff6mr1541650igc.7.1354802786072; Thu, 06 Dec 2012 06:06:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.6.129 with HTTP; Thu, 6 Dec 2012 06:06:05 -0800 (PST) In-Reply-To: References: From: Harsh J Date: Thu, 6 Dec 2012 19:36:05 +0530 Message-ID: Subject: Re: Is Put() operation a synchronous call on server side? To: "user@hbase.apache.org" Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlZS7rPbUsW6cIzVuLPNdCX92KN7MM5j+6HrAcugRT6yKCPF6PTfwW84F57/VSFKK7LdMdu X-Virus-Checked: Checked by ClamAV on apache.org Hi Yun, Yes, a single Put call is safely synchronous in nature. A Put is placed on the WAL, added to the MemStore, and then returned back as a success to the client if all went well. A Put does not directly go to disk, and gets flushed from the MemStore based on regular flushing patterns or based on manual invocations of flush called on its region or its table. The path to follow is quite simple - A Put goes from a Client (HTable) to a RegionServer (HRegionServer). You've already read the Client areas, so if you read HRegionServer#put(=85) method(s), which is the server-end of it, you'll see the Server-RPC end of it. On Thu, Dec 6, 2012 at 6:32 PM, yun peng wrote: > Hi, since on client side HBase can immediately send Put() by turning off > setAutoFlush(), I am wondering if Put() in HBase server side is executed = in > synchronous way? Be a bit more specific, given a Put() that already arriv= es > at HRegion, will it wait (or be blocking) until all put-related operation= s > are done, such as write to WAL and write to memstore, or even flush to di= sk > (though may not on every time). Or it just triggers put-related operation= s > and immediately returns.... > > > Besides, in research of this problem, I found it not very easy to find th= e > code that perform RPC in HBase, for example, how does client-side > HTable.put() invoke the server-side HRegion.put().... Can anyone points t= o > me the related code path on this regards? Thanks... > regards, > Yun --=20 Harsh J