Return-Path: Delivered-To: apmail-lucene-hadoop-commits-archive@locus.apache.org Received: (qmail 6629 invoked from network); 6 Sep 2006 22:40:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Sep 2006 22:40:01 -0000 Received: (qmail 10933 invoked by uid 500); 6 Sep 2006 22:40:01 -0000 Delivered-To: apmail-lucene-hadoop-commits-archive@lucene.apache.org Received: (qmail 10865 invoked by uid 500); 6 Sep 2006 22:40:00 -0000 Mailing-List: contact hadoop-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-commits@lucene.apache.org Received: (qmail 10856 invoked by uid 99); 6 Sep 2006 22:40:00 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Sep 2006 15:40:00 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Sep 2006 15:39:59 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id AB3A01A981A; Wed, 6 Sep 2006 15:39:39 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r440892 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/DFSClient.java Date: Wed, 06 Sep 2006 22:39:39 -0000 To: hadoop-commits@lucene.apache.org From: cutting@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20060906223939.AB3A01A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: cutting Date: Wed Sep 6 15:39:38 2006 New Revision: 440892 URL: http://svn.apache.org/viewvc?view=rev&rev=440892 Log: HADOOP-286. Avoid pinging the NameNode with renewLease() calls when no files are being written. Contributed by Konstantin. Modified: lucene/hadoop/trunk/CHANGES.txt lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java Modified: lucene/hadoop/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=440892&r1=440891&r2=440892 ============================================================================== --- lucene/hadoop/trunk/CHANGES.txt (original) +++ lucene/hadoop/trunk/CHANGES.txt Wed Sep 6 15:39:38 2006 @@ -133,6 +133,10 @@ the destination of a file copy is a directory. (Hairong Kuang via cutting) +34. HADOOP-286. In DFSClient, avoid pinging the NameNode with + renewLease() calls when no files are being written. + (Konstantin Shvachko via cutting) + Release 0.5.0 - 2006-08-04 Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java?view=diff&rev=440892&r1=440891&r2=440892 ============================================================================== --- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java (original) +++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java Wed Sep 6 15:39:38 2006 @@ -436,8 +436,9 @@ while (running) { if (System.currentTimeMillis() - lastRenewed > (LEASE_PERIOD / 2)) { try { + if( pendingCreates.size() > 0 ) namenode.renewLease(clientName); - lastRenewed = System.currentTimeMillis(); + lastRenewed = System.currentTimeMillis(); } catch (IOException ie) { String err = StringUtils.stringifyException(ie); LOG.warn("Problem renewing lease for " + clientName +