hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1128009 - in /hadoop/hdfs/trunk: CHANGES.txt src/test/hdfs/org/apache/hadoop/cli/TestHDFSCLI.java
Date Thu, 26 May 2011 18:00:28 GMT
Author: todd
Date: Thu May 26 18:00:28 2011
New Revision: 1128009

URL: http://svn.apache.org/viewvc?rev=1128009&view=rev
Log:
HDFS-1812. TestHDFSCLI should clean up cluster in teardown method. Contributed by Uma Maheswara
Rao G.

Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/TestHDFSCLI.java

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=1128009&r1=1128008&r2=1128009&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Thu May 26 18:00:28 2011
@@ -450,6 +450,9 @@ Trunk (unreleased changes)
     HDFS-1996.  ivy: hdfs test jar should be independent to common test jar.
     (Eric Yang via szetszwo)
 
+    HDFS-1812. TestHDFSCLI should clean up cluster in teardown method.
+    (Uma Maheswara Rao G via todd)
+
   OPTIMIZATIONS
 
     HDFS-1458. Improve checkpoint performance by avoiding unnecessary image

Modified: hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/TestHDFSCLI.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/TestHDFSCLI.java?rev=1128009&r1=1128008&r2=1128009&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/TestHDFSCLI.java (original)
+++ hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/cli/TestHDFSCLI.java Thu May 26 18:00:28
2011
@@ -34,7 +34,7 @@ import org.junit.Test;
 public class TestHDFSCLI extends CLITestHelperDFS {
 
   protected MiniDFSCluster dfsCluster = null;
-  protected DistributedFileSystem dfs = null;
+  protected FileSystem fs = null;
   protected String namenode = null;
   
   @Before
@@ -61,10 +61,9 @@ public class TestHDFSCLI extends CLITest
     
     username = System.getProperty("user.name");
 
-    FileSystem fs = dfsCluster.getFileSystem();
+    fs = dfsCluster.getFileSystem();
     assertTrue("Not a HDFS: "+fs.getUri(),
                fs instanceof DistributedFileSystem);
-    dfs = (DistributedFileSystem) fs;
   }
 
   @Override
@@ -75,7 +74,8 @@ public class TestHDFSCLI extends CLITest
   @After
   @Override
   public void tearDown() throws Exception {
-    dfs.close();
+    if (null != fs)
+      fs.close();
     dfsCluster.shutdown();
     Thread.sleep(2000);
     super.tearDown();



Mime
View raw message