hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brando...@apache.org
Subject svn commit: r1581064 - in /hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop: nfs/nfs3/IdUserGroup.java nfs/nfs3/Nfs3FileAttributes.java portmap/Portmap.java
Date Mon, 24 Mar 2014 21:05:50 GMT
Author: brandonli
Date: Mon Mar 24 21:05:49 2014
New Revision: 1581064

URL: http://svn.apache.org/r1581064
Log:
HDFS-6050. Merging change r1581059 from branch-2

Modified:
    hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/IdUserGroup.java
    hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3FileAttributes.java
    hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/portmap/Portmap.java

Modified: hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/IdUserGroup.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/IdUserGroup.java?rev=1581064&r1=1581063&r2=1581064&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/IdUserGroup.java
(original)
+++ hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/IdUserGroup.java
Mon Mar 24 21:05:49 2014
@@ -166,8 +166,7 @@ public class IdUserGroup {
         try {
           br.close();
         } catch (IOException e1) {
-          LOG.error("Can't close BufferedReader of command result");
-          e1.printStackTrace();
+          LOG.error("Can't close BufferedReader of command result", e1);
         }
       }
     }
@@ -249,7 +248,7 @@ public class IdUserGroup {
       uid = getUid(user);
     } catch (IOException e) {
       uid = user.hashCode();
-      LOG.info("Can't map user " + user + ". Use its string hashcode:" + uid);
+      LOG.info("Can't map user " + user + ". Use its string hashcode:" + uid, e);
     }
     return uid;
   }
@@ -262,7 +261,7 @@ public class IdUserGroup {
       gid = getGid(group);
     } catch (IOException e) {
       gid = group.hashCode();
-      LOG.debug("Can't map group " + group + ". Use its string hashcode:" + gid);
+      LOG.info("Can't map group " + group + ". Use its string hashcode:" + gid, e);
     }
     return gid;
   }

Modified: hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3FileAttributes.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3FileAttributes.java?rev=1581064&r1=1581063&r2=1581064&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3FileAttributes.java
(original)
+++ hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3FileAttributes.java
Mon Mar 24 21:05:49 2014
@@ -35,7 +35,7 @@ public class Nfs3FileAttributes {
   private long used;
   private Specdata3 rdev;
   private long fsid;
-  private long fileid;
+  private long fileId;
   private NfsTime atime;
   private NfsTime mtime;
   private NfsTime ctime;
@@ -76,7 +76,7 @@ public class Nfs3FileAttributes {
   }
 
   public Nfs3FileAttributes(NfsFileType nfsType, int nlink, short mode, int uid,
-      int gid, long size, long fsid, long fileid, long mtime, long atime) {
+      int gid, long size, long fsid, long fileId, long mtime, long atime) {
     this.type = nfsType.toValue();
     this.mode = mode;
     this.nlink = (type == NfsFileType.NFSDIR.toValue()) ? (nlink + 2) : 1;
@@ -89,7 +89,7 @@ public class Nfs3FileAttributes {
     this.used = this.size;
     this.rdev = new Specdata3();
     this.fsid = fsid;
-    this.fileid = fileid;
+    this.fileId = fileId;
     this.mtime = new NfsTime(mtime);
     this.atime = atime != 0 ? new NfsTime(atime) : this.mtime;
     this.ctime = this.mtime;
@@ -105,7 +105,7 @@ public class Nfs3FileAttributes {
     this.used = other.getUsed();
     this.rdev = new Specdata3();
     this.fsid = other.getFsid();
-    this.fileid = other.getFileid();
+    this.fileId = other.getFileId();
     this.mtime = new NfsTime(other.getMtime());
     this.atime = new NfsTime(other.getAtime());
     this.ctime = new NfsTime(other.getCtime());
@@ -122,7 +122,7 @@ public class Nfs3FileAttributes {
     xdr.writeInt(rdev.getSpecdata1());
     xdr.writeInt(rdev.getSpecdata2());
     xdr.writeLongAsHyper(fsid);
-    xdr.writeLongAsHyper(fileid);
+    xdr.writeLongAsHyper(fileId);
     atime.serialize(xdr);
     mtime.serialize(xdr);
     ctime.serialize(xdr);
@@ -142,7 +142,7 @@ public class Nfs3FileAttributes {
     xdr.readInt();
     attr.rdev = new Specdata3();
     attr.fsid = xdr.readHyper();
-    attr.fileid = xdr.readHyper();
+    attr.fileId = xdr.readHyper();
     attr.atime = NfsTime.deserialize(xdr);
     attr.mtime = NfsTime.deserialize(xdr);
     attr.ctime = NfsTime.deserialize(xdr);
@@ -154,7 +154,7 @@ public class Nfs3FileAttributes {
     return String.format("type:%d, mode:%d, nlink:%d, uid:%d, gid:%d, " + 
             "size:%d, used:%d, rdev:%s, fsid:%d, fileid:%d, atime:%s, " + 
             "mtime:%s, ctime:%s",
-            type, mode, nlink, uid, gid, size, used, rdev, fsid, fileid, atime,
+            type, mode, nlink, uid, gid, size, used, rdev, fsid, fileId, atime,
             mtime, ctime);
   }
 
@@ -170,8 +170,8 @@ public class Nfs3FileAttributes {
     return fsid;
   }
 
-  public long getFileid() {
-    return fileid;
+  public long getFileId() {
+    return fileId;
   }
 
   public NfsTime getAtime() {
@@ -194,10 +194,6 @@ public class Nfs3FileAttributes {
     return new WccAttr(size, mtime, ctime);
   }
   
-  public long getFileId() {
-    return fileid;
-  }
-  
   public long getSize() {
     return size;
   }

Modified: hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/portmap/Portmap.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/portmap/Portmap.java?rev=1581064&r1=1581063&r2=1581064&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/portmap/Portmap.java
(original)
+++ hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/portmap/Portmap.java
Mon Mar 24 21:05:49 2014
@@ -65,7 +65,7 @@ final class Portmap {
       pm.start(DEFAULT_IDLE_TIME_MILLISECONDS,
           new InetSocketAddress(port), new InetSocketAddress(port));
     } catch (Throwable e) {
-      LOG.fatal("Failed to start the server. Cause:" + e.getMessage());
+      LOG.fatal("Failed to start the server. Cause:", e);
       pm.shutdown();
       System.exit(-1);
     }



Mime
View raw message