Return-Path: X-Original-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 28BAB98B9 for ; Thu, 16 Feb 2012 15:34:36 +0000 (UTC) Received: (qmail 57556 invoked by uid 500); 16 Feb 2012 15:34:36 -0000 Delivered-To: apmail-incubator-accumulo-commits-archive@incubator.apache.org Received: (qmail 57534 invoked by uid 500); 16 Feb 2012 15:34:36 -0000 Mailing-List: contact accumulo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: accumulo-dev@incubator.apache.org Delivered-To: mailing list accumulo-commits@incubator.apache.org Received: (qmail 57527 invoked by uid 99); 16 Feb 2012 15:34:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 15:34:36 +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, 16 Feb 2012 15:34:35 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 38A5D23888E4; Thu, 16 Feb 2012 15:34:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1245029 - /incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java Date: Thu, 16 Feb 2012 15:34:15 -0000 To: accumulo-commits@incubator.apache.org From: ecn@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120216153415.38A5D23888E4@eris.apache.org> Author: ecn Date: Thu Feb 16 15:34:14 2012 New Revision: 1245029 URL: http://svn.apache.org/viewvc?rev=1245029&view=rev Log: ACCUMULO-393: use the spiffy "retainAll" method to do the set intersection Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1245029&r1=1245028&r2=1245029&view=diff ============================================================================== --- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java (original) +++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java Thu Feb 16 15:34:14 2012 @@ -1420,12 +1420,7 @@ public class Master implements Listener, } } synchronized (badServers) { - Set deadBadServers = new HashSet(badServers.keySet()); - deadBadServers.removeAll(currentServers); - if (!badServers.isEmpty()) { - log.debug("Forgetting about bad servers: " + badServers); - } - badServers.entrySet().removeAll(deadBadServers); + badServers.keySet().retainAll(currentServers); } log.debug(String.format("Finished gathering information from %d servers in %.2f seconds", result.size(), (System.currentTimeMillis() - start) / 1000.)); return result;