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 02AC110DF2 for ; Thu, 1 Aug 2013 13:32:37 +0000 (UTC) Received: (qmail 87605 invoked by uid 500); 1 Aug 2013 13:32:34 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 87560 invoked by uid 500); 1 Aug 2013 13:32:34 -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 87552 invoked by uid 99); 1 Aug 2013 13:32:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 13:32:34 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yongyong313@gmail.com designates 209.85.220.48 as permitted sender) Received: from [209.85.220.48] (HELO mail-pa0-f48.google.com) (209.85.220.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 13:32:27 +0000 Received: by mail-pa0-f48.google.com with SMTP id kp13so2138933pab.21 for ; Thu, 01 Aug 2013 06:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=JYftHK4Q7KYbA105VXwPPGa9makkZF4q8t4fFI2N4MU=; b=K834VmHBpmMXwidwA+xEz9u/BDMxfsi7y0oKSMXl+6/DGGhi96c3A/AUSUjueahyoi 61d6cBj9bvUQfc81Jo41O1Ymf4lK5ZA94tGTb40I4u1Ynxe7RcC01iCKWpdyAxmA8mx+ h/Rp2fFpclLWyMcPK5dMFDDeQtk3ovaWsIihTSYDb3nSQnLZI0U0Oe1xALMr8qZl6uWt 1obeZ2hRnAxKusC3mZrD3wI4cI2Efp+Q1fIcla/Aa58bKrOBb9vycea6EWhOITe5s1Zz 2gQQmWOZa77AOFM9LEs/0bciWYq8PprkQWrIKSZnD6CRtp7po1kYD5OcylUO4swmOECg YYXw== MIME-Version: 1.0 X-Received: by 10.68.218.132 with SMTP id pg4mr1906478pbc.200.1375363926424; Thu, 01 Aug 2013 06:32:06 -0700 (PDT) Received: by 10.66.86.168 with HTTP; Thu, 1 Aug 2013 06:32:06 -0700 (PDT) In-Reply-To: <47C902F1-9F3D-46D8-BFCB-1D353EF16982@gmail.com> References: <47C902F1-9F3D-46D8-BFCB-1D353EF16982@gmail.com> Date: Thu, 1 Aug 2013 15:32:06 +0200 Message-ID: Subject: Re: slow operation in postPut From: yonghu To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=e89a8ffbaaf545824904e2e2de2c X-Virus-Checked: Checked by ClamAV on apache.org --e89a8ffbaaf545824904e2e2de2c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable If I want to use multi-thread with thread safe, which class should I use? On Thu, Aug 1, 2013 at 3:08 PM, Ted Yu wrote: > HTable is not thread safe. > > On Aug 1, 2013, at 5:58 AM, Pavel Han=C4=8Dar wr= ote: > > > Hello, > > I have a class extending BaseRegionObserver and I use the postPut metho= d > to > > run a slow procedure. I'd like to run more these procedures in more > > threads. Is it possible to run more HTable.put(put) methods > concurrently? I > > tried, but I have this error for each thread: > > > > Exception in thread "Thread-3" java.lang.IndexOutOfBoundsException: > Index: > > 1, Size: 1 > > at java.util.ArrayList.rangeCheck(ArrayList.java:604) > > at java.util.ArrayList.remove(ArrayList.java:445) > > at > > org.apache.hadoop.hbase.client.HTable.flushCommits(HTable.java:966) > > at org.apache.hadoop.hbase.client.HTable.doPut(HTable.java:811) > > at org.apache.hadoop.hbase.client.HTable.put(HTable.java:786) > > at img.PutFilesThread.run(PutFilesThread.java:74) > > at java.lang.Thread.run(Thread.java:724) > > > > Anybody has an idea? > > Thanks, > > Pavel Han=C4=8Dar > --e89a8ffbaaf545824904e2e2de2c--