Return-Path: Delivered-To: apmail-hadoop-hbase-user-archive@locus.apache.org Received: (qmail 4862 invoked from network); 15 Dec 2008 19:32:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Dec 2008 19:32:25 -0000 Received: (qmail 41667 invoked by uid 500); 15 Dec 2008 19:32:36 -0000 Delivered-To: apmail-hadoop-hbase-user-archive@hadoop.apache.org Received: (qmail 41650 invoked by uid 500); 15 Dec 2008 19:32:36 -0000 Mailing-List: contact hbase-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-user@hadoop.apache.org Delivered-To: mailing list hbase-user@hadoop.apache.org Received: (qmail 41639 invoked by uid 99); 15 Dec 2008 19:32:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Dec 2008 11:32:36 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of michael.dagaev@gmail.com designates 209.85.218.14 as permitted sender) Received: from [209.85.218.14] (HELO mail-bw0-f14.google.com) (209.85.218.14) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Dec 2008 19:32:21 +0000 Received: by bwz7 with SMTP id 7so6033252bwz.5 for ; Mon, 15 Dec 2008 11:32:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=gvzuY4VFzSPjtBg8qIhk1d6kgyr36HEiV+M2sTXeBtY=; b=nuGTjwdjBCMN4Mx+wKmNo2e/jadr0HEOm+1wPpuNRhMIpeYzvR9PEKnxEfz/SxZsc2 vaDlEH34Zs8sGDXg7j4X2FJc7GMpk0aQLQK2A/VPi8VFk+fMbkIWH//3bKhaPmH/K7lZ iU0BEoKpebDoHo203N7w9eYVNeD99g3mwrlSw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=wpai7QlzrXF8r1awHE85eSJzoAWOwOUaBCaufquF1UK47go0RcztsMLC/bXZDDZpsy 02i+KrzYI+LwCz1KvOdDDYDR4uefsvGMagThmhEr9IYfmDNP5IubjT9Kd0tcAV783k04 J47x6Vcs8L/36JU6gv/iR1TVvLQPI02xz1pmo= Received: by 10.223.115.131 with SMTP id i3mr7106477faq.95.1229369317385; Mon, 15 Dec 2008 11:28:37 -0800 (PST) Received: by 10.223.109.135 with HTTP; Mon, 15 Dec 2008 11:28:37 -0800 (PST) Message-ID: <2f81e00812151128mc444146k3c3a810f6e59aa72@mail.gmail.com> Date: Mon, 15 Dec 2008 21:28:37 +0200 From: "Michael Dagaev" To: hbase-user@hadoop.apache.org Subject: Re: HTables Pool In-Reply-To: <49468467.6020702@duboce.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2f81e00812150223p2df2328fpb9c8be87765c23c8@mail.gmail.com> <49468467.6020702@duboce.net> X-Virus-Checked: Checked by ClamAV on apache.org Michael, Could you explain, please, why the Hbase PRC has such a limitation? As I remember, Hbase uses Thrift as an PRC mechanism. Is it a Thrift limitation? Can it be changed? It is also interesting why Hbase uses Thrift rather than Java RMI. I can guess that RMI is not so good at bulk data transfer but I do not know it for sure. Thank you for your cooperation, M. On Mon, Dec 15, 2008 at 6:23 PM, stack wrote: > Sorry Slava, 'RPC Lock' was misinformation on our part. Subsequent digging > turned up the fact that RPC has a pool of Connections, one to each remote > host. Send and receive on this single connection is synchronous but > otherwise, Connection is idle. Primitive testing had it that there is a > benefit to having multiple HTable instances. As to how much, we have yet to > ascertain and at high numbers of HTable, there'd start to be contention over > the single Connection (or if amount of data being passed was large). > > We'll post when we have a better story than the above, > Good stuff, > St.Ack > > Slava Gorelik wrote: >> >> As far as i know the HTable itself has connection pool (HConnectionManager >> is singleton).I think, multiple instances of HTable within same >> application >> will not help you. >> You better try to use multiple process instead of multiple threads. >> >> You can search the mailing list archive, i asked almost same question. >> Current HBase client implementation has some RPC Lock, i.e. >> multi-threading >> is not useful. >> >> Best Regards. >> >> On Mon, Dec 15, 2008 at 12:23 PM, Michael Dagaev >> wrote: >> >> >>> >>> Hi, all >>> >>> Currently, we are using a single instance of HTable in a >>> multithreaded application. That is, several threads use the same >>> instance of HTable to insert data in the database. Since method >>> "commit" of HTable is synchronized, we are afraid that the single >>> instance of HTable can be a bottle neck. So, we are going to create a >>> pool of HTable instances (all instances are created with the same >>> table name) and use the instances simultaneously (an instance per >>> thread). >>> >>> Does it make sense? >>> >>> Thank you for your cooperation, >>> M. >>> >>> >> >> > >