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 3E0CF2FE8 for ; Thu, 21 Apr 2011 02:21:27 +0000 (UTC) Received: (qmail 46664 invoked by uid 500); 21 Apr 2011 02:21:26 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 46622 invoked by uid 500); 21 Apr 2011 02:21: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 46614 invoked by uid 99); 21 Apr 2011 02:21:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Apr 2011 02:21:25 +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 robert.mahfoud@gmail.com designates 209.85.210.41 as permitted sender) Received: from [209.85.210.41] (HELO mail-pz0-f41.google.com) (209.85.210.41) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Apr 2011 02:21:19 +0000 Received: by pzk32 with SMTP id 32so942766pzk.14 for ; Wed, 20 Apr 2011 19:20:58 -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:from:date :message-id:subject:to:content-type; bh=T46HrWde5sTBzuc/KHQcPqp1a/VpQziIoXkMwsBVTrw=; b=xgEKhsVqCuMlNhN4cTH9BROE7LEdWqEMzNB6JmjnmBHy5tbCTCtE12Fc9ozL/BQi8O WAwYxEhFY80wTV4UmfqtRo8qgMcNZWXx0UJIm63tmBVyRXHjMB5SwCZJJw9cEg8efwQx FWBgzSe/fmTXAmj/ak2jYBiUZsX1Y7RcTq0P4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=BMTywmXvyEt/NIW31v0gNDs++JSY/jv/RdSMTinF3J9p0CNGpsWPZBGclkjwyb+k/v pe1uLzyhK5daRGUNsFh4Xh1u5gYy7w6x031o8HvjGuIbzxEpMCZXzuhxdbLyAdBdgW/T cKqH2+dRP7mZZQapYEJHdK84+Zl+ZrHNrdF4M= Received: by 10.68.49.34 with SMTP id r2mr11081140pbn.527.1303352458250; Wed, 20 Apr 2011 19:20:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.55.41 with HTTP; Wed, 20 Apr 2011 19:20:38 -0700 (PDT) In-Reply-To: References: From: Robert Mahfoud Date: Wed, 20 Apr 2011 19:20:38 -0700 Message-ID: Subject: Re: LocalJobRunner and HBASE-2669 woes To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=bcaec544eb6e4a899204a16464d0 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec544eb6e4a899204a16464d0 Content-Type: text/plain; charset=UTF-8 On Wed, Apr 20, 2011 at 12:38 PM, Stack wrote: > On Wed, Apr 20, 2011 at 12:18 PM, Robert Mahfoud > wrote: > > I'm upgrading our code base now to HBase 0.90.1 (CDH3-U0) from > 0.89.something. > > I'm facing a very hard time tracking failures in our unit tests and > working around them. Here's the situation: > > > > 1- Many of our unit tests run in-process M/R jobs using the > LocalJobRunner. > > 2- We often do things before the M/R jobs and things afte the M/R to > validate the outcome. > > 3- With HBASE-2669 adding the HCM.deleteAllConnections(true) to the > TableOutputFormat.close() method, any connections that were open before the > M/R job will be closed. > > > This came up last week. There the user made a copy of TOF because > this.table is private preventing changing how TOF#close works. If we > added an accessor for the table to TOF so you could override its close > behavior, would that work for you? > > Thanks for the suggestion. I'm going to try to do that and add a configuration flag to the copied class. I will look for the update that makes this.table protected. I think that this wasn't a wise design choice since one wouldn't expect using an "incidental" class (TOF) to have such a pervasive side effect. Adding a configuration flag could also be a quick and easy fix until a global solution emerges (maybe as part of HBASE-3766 or HBASE-37777). > > > Some issues I'm facing are much more subtle and harder to work around: > e.g. it's impossible to run 2 M/R jobs in parallel (at least one of them > using TableOutputFormat) because as soon as the first TableOutputFormat > calls HCM.deleteAllConnections(...) the other's connections will be closed. > > > > Yes. > > > The questions that I have are the following: > > 1- Is there any simpler way to do the same thing? > > 2- Are there any best-practices that we are missing, and that could help > with this issue? > > We changed TOF. It looks like messed up the case where folks are > running multiple MR jobs all up in the one jvm context. > > > > 3- Nothing turns up when we google "HBASE-2669 AND LocalJobRunner" and > very few things come up when we google "HBASE-2669" alone. Do you know of > anyone else facing a similar problem? > > 4- Should there be a configuration flag that turns off this behavior when > using the LocalJobRunner? > > > > See above. > > Sorry for the inconvenience. > > St.Ack > -- Robert Mahfoud http://www.1apple1day.com/ --bcaec544eb6e4a899204a16464d0--