hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r561447 - in /lucene/hadoop/branches/branch-0.14: CHANGES.txt src/java/org/apache/hadoop/dfs/FSDirectory.java src/test/org/apache/hadoop/dfs/TestFileStatus.java
Date Tue, 31 Jul 2007 19:16:56 GMT
Author: dhruba
Date: Tue Jul 31 12:16:56 2007
New Revision: 561447

URL: http://svn.apache.org/viewvc?view=rev&rev=561447
Log:
HADOOP-1647.  FileSystem.getFileStatus returns valid values for "/".
(Dhruba Borthakur via dhruba)
merge -r 561443 from trunk to 0.14 branch.


Added:
    lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/dfs/TestFileStatus.java
      - copied unchanged from r561443, lucene/hadoop/trunk/src/test/org/apache/hadoop/dfs/TestFileStatus.java
Modified:
    lucene/hadoop/branches/branch-0.14/CHANGES.txt
    lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSDirectory.java

Modified: lucene/hadoop/branches/branch-0.14/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/CHANGES.txt?view=diff&rev=561447&r1=561446&r2=561447
==============================================================================
--- lucene/hadoop/branches/branch-0.14/CHANGES.txt (original)
+++ lucene/hadoop/branches/branch-0.14/CHANGES.txt Tue Jul 31 12:16:56 2007
@@ -421,6 +421,9 @@
 141. HADOOP-1551.  libhdfs supports setting replication factor and
      retrieving modification time of files.  (Sameer Paranjpye via dhruba)
 
+141. HADOOP-1647.  FileSystem.getFileStatus returns valid values for "/".
+     (Dhruba Borthakur via dhruba)
+
 
 Release 0.13.0 - 2007-06-08
 

Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSDirectory.java?view=diff&rev=561447&r1=561446&r2=561447
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSDirectory.java (original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSDirectory.java Tue
Jul 31 12:16:56 2007
@@ -110,6 +110,9 @@
      * @return the string representation of the absolute path of this file
      */
     String getAbsoluteName() {
+      if (this.parent == null) {    
+        return Path.SEPARATOR;       // root directory is "/"
+      }
       return internalGetAbsolutePathName().toString();
     }
 
@@ -301,8 +304,6 @@
       return total + 1;
     }
 
-    /**
-     */
     long computeFileLength() {
       long total = 0;
       if (blocks != null) {



Mime
View raw message