hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r954165 - in /hadoop/common/trunk: CHANGES.txt src/java/org/apache/hadoop/fs/FileStatus.java src/test/core/org/apache/hadoop/fs/TestFileStatus.java
Date Sun, 13 Jun 2010 04:38:38 GMT
Author: eli
Date: Sun Jun 13 04:38:37 2010
New Revision: 954165

URL: http://svn.apache.org/viewvc?rev=954165&view=rev
Log:
HADOOP-6796. Reverting the patch.

Removed:
    hadoop/common/trunk/src/test/core/org/apache/hadoop/fs/TestFileStatus.java
Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileStatus.java

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=954165&r1=954164&r2=954165&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Sun Jun 13 04:38:37 2010
@@ -76,8 +76,6 @@ Trunk (unreleased changes)
     HADOOP-6687.   user object in the subject in UGI should be reused in case 
     of a relogin. (jnp via boryas)
 
-    HADOOP-6796. FileStatus allows null srcPath but crashes if that's done. (Rodrigo Schmidt
via eli)
-
     HADOOP-6603. Provide workaround for issue with Kerberos not resolving 
     cross-realm principal (Kan Zhang and Jitendra Pandey via jghoman)
 

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileStatus.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileStatus.java?rev=954165&r1=954164&r2=954165&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileStatus.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileStatus.java Sun Jun 13 04:38:37
2010
@@ -33,19 +33,19 @@ import org.apache.hadoop.io.Writable;
 @InterfaceStability.Stable
 public class FileStatus implements Writable, Comparable {
 
-  private Path path = null;
-  private long length = 0;
-  private boolean isdir = false;
-  private short block_replication = 0;
-  private long blocksize = 0;
-  private long modification_time = 0;
-  private long access_time = 0;
-  private FsPermission permission = null;
-  private String owner = null;
-  private String group = null;
-  private Path symlink = null;
+  private Path path;
+  private long length;
+  private boolean isdir;
+  private short block_replication;
+  private long blocksize;
+  private long modification_time;
+  private long access_time;
+  private FsPermission permission;
+  private String owner;
+  private String group;
+  private Path symlink;
   
-  public FileStatus() {}
+  public FileStatus() { this(0, false, 0, 0, 0, 0, null, null, null, null); }
   
   //We should deprecate this soon?
   public FileStatus(long length, boolean isdir, int block_replication,
@@ -67,12 +67,6 @@ public class FileStatus implements Writa
          access_time, permission, owner, group, null, path);
   }
 
-  private void stateSanityCheck() {
-    if (path == null) {
-      throw new IllegalArgumentException("path cannot be null");
-    }
-  }
-
   public FileStatus(long length, boolean isdir,
                     int block_replication,
                     long blocksize, long modification_time, long access_time,
@@ -91,7 +85,6 @@ public class FileStatus implements Writa
     this.group = (group == null) ? "" : group;
     this.symlink = symlink;
     this.path = path;
-    stateSanityCheck();
   }
 
   /**



Mime
View raw message