Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D3C96498 for ; Mon, 20 Jun 2011 21:31:06 +0000 (UTC) Received: (qmail 62215 invoked by uid 500); 20 Jun 2011 21:31:05 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 62190 invoked by uid 500); 20 Jun 2011 21:31:05 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 62182 invoked by uid 99); 20 Jun 2011 21:31:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2011 21:31:05 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yuzhihong@gmail.com designates 74.125.83.169 as permitted sender) Received: from [74.125.83.169] (HELO mail-pv0-f169.google.com) (74.125.83.169) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2011 21:30:58 +0000 Received: by pvc12 with SMTP id 12so1588955pvc.14 for ; Mon, 20 Jun 2011 14:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=5gEYPMlRJHyRngNjh40zgHjCBIJrKi2v99Icv2xjf8Y=; b=nRtWfrwFURJ1wUdipkHgfe8v+yarC7IlssOPvQNq3lemGdTWQqe+6uN0KQHV+ZQbvg hKuc+9IVzKtb3QYicvKv3vrdN8BZ+MdNyOpJq0QYYSPcXWoQI+ofplpIP0ANC6mxefQy V7bRGhKWn9vVZwq2fcEj1EYh7MgVG99qZNv6Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=K2ParyVeKxiDn8538JM+B/ydeWlAqdiTcDY4YwrluVvIO9uEMmKLfgv1GkbXRuCvqj h5KV0PkZtTt/jaV0HJIEBhlJRZypLIvQjX3xEZowBi24rYgZ4tF5hGCPcgHI5KIptcgK jVqRSWTaj67OmY/nyhmzHl4J5aC8WU9PfZ63k= MIME-Version: 1.0 Received: by 10.68.35.200 with SMTP id k8mr870534pbj.16.1308605437075; Mon, 20 Jun 2011 14:30:37 -0700 (PDT) Received: by 10.68.66.168 with HTTP; Mon, 20 Jun 2011 14:30:37 -0700 (PDT) In-Reply-To: References: Date: Mon, 20 Jun 2011 14:30:37 -0700 Message-ID: Subject: Re: HBASE 3904 From: Ted Yu To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=bcaec521628f3a5f1e04a62b7281 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec521628f3a5f1e04a62b7281 Content-Type: text/plain; charset=ISO-8859-1 Can we simplify the following with this: 1st iteration of meta scanning, calculate numRegs = number of offline regions + number of online regions (for underlying table) subsequent iterations of meta scanning, if number of online regions (for underlying table) reaches numRegs, break. Cheers On Mon, Jun 20, 2011 at 2:05 PM, Todd Lipcon wrote: > Why not the following pseudo-code for isTableAvailable: > > scanMeta(table, Set online, Set offline) { > scan meta, inserting into the above sets any regions found for the > table in question > } > > Set everSeenOnline = new Set(); > while (true) { > Set online = new Set(); > Set offline = new Set(); > scanMeta(table, online, offline); > everSeenOnline.addAll(online); > Set stillWaiting = Sets.setDifference(offline, everSeenOnline) > if (stillWaiting.isEmpty()) return; > sleep; > } > > i.e we wait until we have no offline regions that we've never seen online > > On Mon, Jun 20, 2011 at 10:27 AM, Stack wrote: > > Yeah, its not intuitive but failing your passing isTableAvailable the > > knowledge it needs, then its going to have to do heuristics to figure > > table deploy. We can work on what these will look like -- region is > > open but not split, no region opened in last N minutes or seconds -- > > but I think it will always be an imprecise especially when you are up > > in Vidhya's 70k regions range. > > > > St.Ack > > > > On Sun, Jun 19, 2011 at 9:02 PM, Ted Yu wrote: > >> I put patch v5 on 3904. > >> When user calls HBaseAdmin.createTableAsync() to create the table, > >> HCM.isTableAvailable() is still vulnerable because currently it doesn't > >> known the desired number of regions. > >> We can add a new parameter to HCM.isTableAvailable() but > >> 1. HConnection needs to be modified to accommodate this change > >> 2. I personally think it is not intuitive. > >> > >> Comments are welcome. > >> > >> On Fri, Jun 17, 2011 at 8:48 AM, Stack wrote: > >> > >>> On Thu, Jun 16, 2011 at 5:43 PM, Ted Yu wrote: > >>> > HBA.createTable() takes too long to execute. Client receives Socket > >>> timeout > >>> > exception. > >>> > >>> This is because the create is running in the master? Can we have > >>> waiting happen client-side over in HBaseAdmin? > >>> > >>> > Client calls HCM.isTableAvailable() which would report inaccurate > status. > >>> > I want to get other developers' opinion on whether > HCM.isTableAvailable() > >>> > should be accurate. > >>> > > >>> > >>> Do we need two forms? An isTableAvailable that will looks at table > >>> and if all regions are online reports true and then another > >>> isTableAvailable where you know how many regions there are supposed to > >>> be in the table and it returns true if that count of regions is open > >>> and deployed? > >>> > >>> St.Ack > >>> > >> > > > > > > -- > Todd Lipcon > Software Engineer, Cloudera > --bcaec521628f3a5f1e04a62b7281--