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 BF1E211D15 for ; Fri, 6 Jun 2014 22:58:27 +0000 (UTC) Received: (qmail 42545 invoked by uid 500); 6 Jun 2014 22:58:26 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 42476 invoked by uid 500); 6 Jun 2014 22:58:26 -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 42466 invoked by uid 99); 6 Jun 2014 22:58:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2014 22:58:26 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jon@cloudera.com designates 209.85.128.175 as permitted sender) Received: from [209.85.128.175] (HELO mail-ve0-f175.google.com) (209.85.128.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2014 22:58:24 +0000 Received: by mail-ve0-f175.google.com with SMTP id us18so1969009veb.34 for ; Fri, 06 Jun 2014 15:58:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=7IU09wksYfbvyPBF7in8o7Wj3Q6grf7sCd1UonsfCO8=; b=dvY7OXqz1gtdq0jJO2soqW9mzzHomhza+1LEGYQdTUnEaFwM6afxCfvCumv+EpO0zR cuQCxJNdhh9fG1FLVydgjFpPqgj4K34o27cE6KnY+Uv4vCE0keJY61mrM8Y0Dui4G7TT HfypjB+0WgC9/+GV54QwsN8/bm6qT831rnos7J509TWg8TwQ1uFOWz+oDPKLX6WrSXxs geJUdK1GIIGYE544sJNg/JiKdG2a5LCv+gaoyeZ/WtMT0sF/VPBOXy0gB02inDgw4kEq 0H4kbJgwLQPgqAc0nHdDtc8bh4vBv9n9ioYdlUVmjQoTCQ4xzONiS+JMFcj+bNRnLLcH eYfA== X-Gm-Message-State: ALoCoQl8hK9oQXv/va8xxH91snl1YAxB2H37BP6K1VsneV0YJ0lleC+cdwAgIxr1BqanEnRQfxrb X-Received: by 10.53.0.135 with SMTP id ay7mr7726229vdd.11.1402095479997; Fri, 06 Jun 2014 15:57:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.50.165 with HTTP; Fri, 6 Jun 2014 15:57:39 -0700 (PDT) In-Reply-To: <1402092060342-4060081.post@n3.nabble.com> References: <1402092060342-4060081.post@n3.nabble.com> From: Jonathan Hsieh Date: Fri, 6 Jun 2014 15:57:39 -0700 Message-ID: Subject: Re: [Discuss] HBase with multiple threads To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=001a1133c54806dccb04fb32cb2f X-Virus-Checked: Checked by ClamAV on apache.org --001a1133c54806dccb04fb32cb2f Content-Type: text/plain; charset=UTF-8 Hotec04, Create one one HConnection for the process and then create an HTable instance for each thread that uses the same HConnection. In newer hbase it is HConnection.getTable(name), in older hbase it is new HTable(HConnection). HTablePool is deprecated, and shouldn't really be used. Jon. On Fri, Jun 6, 2014 at 3:01 PM, Hotec04 wrote: > Hi HBase users, > > I try to implement multiple threads for HBase writing process, but looks > like the table.flushCommites() breaks thread easily. Then I add a > synchronized blocker for it, it flows but when I publish 50 messages, about > 2 of them are missing...I am using HTablePool as well, so when every thread > comes in, they grab one Htable but all Htables are using the same table. > > Any ideas on how to work with HTable put operation for multiple threads? > > Thank you! > > > > -- > View this message in context: > http://apache-hbase.679495.n3.nabble.com/Discuss-HBase-with-multiple-threads-tp4060081.html > Sent from the HBase User mailing list archive at Nabble.com. > -- // Jonathan Hsieh (shay) // HBase Tech Lead, Software Engineer, Cloudera // jon@cloudera.com // @jmhsieh --001a1133c54806dccb04fb32cb2f--