hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r779666 - /hadoop/core/branches/HADOOP-3628-2/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
Date Thu, 28 May 2009 16:56:02 GMT
Author: stevel
Date: Thu May 28 16:56:01 2009
New Revision: 779666

URL: http://svn.apache.org/viewvc?rev=779666&view=rev
Log:
HADOOP-5933 - log where a DfsClient was closed

Modified:
    hadoop/core/branches/HADOOP-3628-2/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java

Modified: hadoop/core/branches/HADOOP-3628-2/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/HADOOP-3628-2/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java?rev=779666&r1=779665&r2=779666&view=diff
==============================================================================
--- hadoop/core/branches/HADOOP-3628-2/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java (original)
+++ hadoop/core/branches/HADOOP-3628-2/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java Thu
May 28 16:56:01 2009
@@ -84,6 +84,7 @@
   final int writePacketSize;
   private final FileSystem.Statistics stats;
   private int maxBlockAcquireFailures;
+  private IOException closedLocation;
     
  
   public static ClientProtocol createNamenode(Configuration conf) throws IOException {
@@ -196,6 +197,9 @@
   private void checkOpen() throws IOException {
     if (!clientRunning) {
       IOException result = new IOException("Filesystem closed");
+      if (closedLocation != null) {
+        result.initCause(closedLocation);
+      }
       throw result;
     }
   }
@@ -215,6 +219,10 @@
   
       // close connections to the namenode
       RPC.stopProxy(rpcNamenode);
+      if (LOG.isDebugEnabled()) {
+        closedLocation = new IOException("Filesystem closed");
+        LOG.debug("Closing filesystem", closedLocation);
+      }
     }
   }
 



Mime
View raw message