Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EAAE1DC17 for ; Thu, 12 Jul 2012 20:00:05 +0000 (UTC) Received: (qmail 33345 invoked by uid 500); 12 Jul 2012 20:00:05 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 33303 invoked by uid 500); 12 Jul 2012 20:00:05 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 33293 invoked by uid 99); 12 Jul 2012 20:00:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2012 20:00:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2012 20:00:03 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D24142388ABB for ; Thu, 12 Jul 2012 19:59:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1360897 - /accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/StopTabletServer.java Date: Thu, 12 Jul 2012 19:59:42 -0000 To: commits@accumulo.apache.org From: ecn@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120712195942.D24142388ABB@eris.apache.org> Author: ecn Date: Thu Jul 12 19:59:42 2012 New Revision: 1360897 URL: http://svn.apache.org/viewvc?rev=1360897&view=rev Log: ACCUMULO-686 handle disappearing tablet servers during the test Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/StopTabletServer.java Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/StopTabletServer.java URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/StopTabletServer.java?rev=1360897&r1=1360896&r2=1360897&view=diff ============================================================================== --- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/StopTabletServer.java (original) +++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/StopTabletServer.java Thu Jul 12 19:59:42 2012 @@ -26,14 +26,18 @@ public class StopTabletServer extends Te ZooReader rdr = new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()); String base = ZooUtil.getRoot(instance) + Constants.ZTSERVERS; for (String child : rdr.getChildren(base)) { - List children = rdr.getChildren(base + "/" + child); - if (children.size() > 0) { - Collections.sort(children); - Stat stat = new Stat(); - byte[] data = rdr.getData(base + "/" + child + "/" + children.get(0), stat); - if (!"master".equals(new String(data))) { - result.add(new TServerInstance(AddressUtil.parseAddress(child, Property.TSERV_CLIENTPORT), stat.getEphemeralOwner())); + try { + List children = rdr.getChildren(base + "/" + child); + if (children.size() > 0) { + Collections.sort(children); + Stat stat = new Stat(); + byte[] data = rdr.getData(base + "/" + child + "/" + children.get(0), stat); + if (!"master".equals(new String(data))) { + result.add(new TServerInstance(AddressUtil.parseAddress(child, Property.TSERV_CLIENTPORT), stat.getEphemeralOwner())); + } } + } catch (KeeperException.NoNodeException ex) { + // someone beat us too it } } return result;