[44/44] hadoop git commit: HDFS-7640. print NFS Client in the NFS log. Contributed by Brandon Li.

2015-01-20 Thread zhz
HDFS-7640. print NFS Client in the NFS log. Contributed by Brandon Li.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/548dad92
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/548dad92
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/548dad92

Branch: refs/heads/HDFS-EC
Commit: 548dad92152edc3844dbdac23521dd44abb81101
Parents: 0b025dd
Author: Haohui Mai whe...@apache.org
Authored: Mon Jan 19 17:29:46 2015 -0800
Committer: Zhe Zhang z...@apache.org
Committed: Tue Jan 20 09:43:13 2015 -0800

--
 .../hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java| 53 +---
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt |  2 +
 2 files changed, 36 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/548dad92/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
 
b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
index 148d4f7..9204c4d 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
@@ -330,8 +330,9 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 }
 
 FileHandle handle = request.getHandle();
-if (LOG.isTraceEnabled()) {
-  LOG.trace(GETATTR for fileId:  + handle.getFileId());
+if (LOG.isDebugEnabled()) {
+  LOG.debug(GETATTR for fileId:  + handle.getFileId() +  client:
+  + remoteAddress);
 }
 
 Nfs3FileAttributes attrs = null;
@@ -423,7 +424,8 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 
 FileHandle handle = request.getHandle();
 if (LOG.isDebugEnabled()) {
-  LOG.debug(NFS SETATTR fileId:  + handle.getFileId());
+  LOG.debug(NFS SETATTR fileId:  + handle.getFileId() +  client:
+  + remoteAddress);
 }
 
 if (request.getAttr().getUpdateFields().contains(SetAttrField.SIZE)) {
@@ -509,7 +511,7 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 String fileName = request.getName();
 if (LOG.isDebugEnabled()) {
   LOG.debug(NFS LOOKUP dir fileId:  + dirHandle.getFileId() +  name: 
-  + fileName);
+  + fileName +  client: + remoteAddress);
 }
 
 try {
@@ -577,7 +579,8 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 Nfs3FileAttributes attrs;
 
 if (LOG.isDebugEnabled()) {
-  LOG.debug(NFS ACCESS fileId:  + handle.getFileId());
+  LOG.debug(NFS ACCESS fileId:  + handle.getFileId() +  client:
+  + remoteAddress);
 }
 
 try {
@@ -643,7 +646,8 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 
 FileHandle handle = request.getHandle();
 if (LOG.isDebugEnabled()) {
-  LOG.debug(NFS READLINK fileId:  + handle.getFileId());
+  LOG.debug(NFS READLINK fileId:  + handle.getFileId() +  client:
+  + remoteAddress);
 }
 
 String fileIdPath = Nfs3Utils.getFileIdPath(handle);
@@ -722,7 +726,7 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 FileHandle handle = request.getHandle();
 if (LOG.isDebugEnabled()) {
   LOG.debug(NFS READ fileId:  + handle.getFileId() +  offset:  + offset
-  +  count:  + count);
+  +  count:  + count +  client: + remoteAddress);
 }
 
 Nfs3FileAttributes attrs;
@@ -863,7 +867,7 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 if (LOG.isDebugEnabled()) {
   LOG.debug(NFS WRITE fileId:  + handle.getFileId() +  offset: 
   + offset +  length: + count +  stableHow: + stableHow.getValue()
-  +  xid: + xid);
+  +  xid: + xid +  client: + remoteAddress);
 }
 
 Nfs3FileAttributes preOpAttr = null;
@@ -936,7 +940,7 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 String fileName = request.getName();
 if (LOG.isDebugEnabled()) {
   LOG.debug(NFS CREATE dir fileId:  + dirHandle.getFileId()
-  +  filename:  + fileName);
+  +  filename:  + fileName +  client: + remoteAddress);
 }
 
 int createMode = request.getMode();
@@ -1067,6 +1071,10 @@ public class RpcProgramNfs3 extends RpcProgram 
implements Nfs3Interface {
 }
 FileHandle dirHandle = request.getHandle();
 String fileName = request.getName();
+if (LOG.isDebugEnabled()) {
+  LOG.debug(NFS MKDIR dirId:  + 

hadoop git commit: HDFS-7640. print NFS Client in the NFS log. Contributed by Brandon Li.

2015-01-19 Thread wheat9
Repository: hadoop
Updated Branches:
  refs/heads/trunk 0a2d3e717 - 5e5e35b18


HDFS-7640. print NFS Client in the NFS log. Contributed by Brandon Li.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5e5e35b1
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5e5e35b1
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5e5e35b1

Branch: refs/heads/trunk
Commit: 5e5e35b1856293503124b77d5d4998a4d8e83082
Parents: 0a2d3e7
Author: Haohui Mai whe...@apache.org
Authored: Mon Jan 19 17:29:46 2015 -0800
Committer: Haohui Mai whe...@apache.org
Committed: Mon Jan 19 17:29:46 2015 -0800

--
 .../hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java| 53 +---
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt |  2 +
 2 files changed, 36 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/5e5e35b1/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
 
b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
index 148d4f7..9204c4d 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
@@ -330,8 +330,9 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 }
 
 FileHandle handle = request.getHandle();
-if (LOG.isTraceEnabled()) {
-  LOG.trace(GETATTR for fileId:  + handle.getFileId());
+if (LOG.isDebugEnabled()) {
+  LOG.debug(GETATTR for fileId:  + handle.getFileId() +  client:
+  + remoteAddress);
 }
 
 Nfs3FileAttributes attrs = null;
@@ -423,7 +424,8 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 
 FileHandle handle = request.getHandle();
 if (LOG.isDebugEnabled()) {
-  LOG.debug(NFS SETATTR fileId:  + handle.getFileId());
+  LOG.debug(NFS SETATTR fileId:  + handle.getFileId() +  client:
+  + remoteAddress);
 }
 
 if (request.getAttr().getUpdateFields().contains(SetAttrField.SIZE)) {
@@ -509,7 +511,7 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 String fileName = request.getName();
 if (LOG.isDebugEnabled()) {
   LOG.debug(NFS LOOKUP dir fileId:  + dirHandle.getFileId() +  name: 
-  + fileName);
+  + fileName +  client: + remoteAddress);
 }
 
 try {
@@ -577,7 +579,8 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 Nfs3FileAttributes attrs;
 
 if (LOG.isDebugEnabled()) {
-  LOG.debug(NFS ACCESS fileId:  + handle.getFileId());
+  LOG.debug(NFS ACCESS fileId:  + handle.getFileId() +  client:
+  + remoteAddress);
 }
 
 try {
@@ -643,7 +646,8 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 
 FileHandle handle = request.getHandle();
 if (LOG.isDebugEnabled()) {
-  LOG.debug(NFS READLINK fileId:  + handle.getFileId());
+  LOG.debug(NFS READLINK fileId:  + handle.getFileId() +  client:
+  + remoteAddress);
 }
 
 String fileIdPath = Nfs3Utils.getFileIdPath(handle);
@@ -722,7 +726,7 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 FileHandle handle = request.getHandle();
 if (LOG.isDebugEnabled()) {
   LOG.debug(NFS READ fileId:  + handle.getFileId() +  offset:  + offset
-  +  count:  + count);
+  +  count:  + count +  client: + remoteAddress);
 }
 
 Nfs3FileAttributes attrs;
@@ -863,7 +867,7 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 if (LOG.isDebugEnabled()) {
   LOG.debug(NFS WRITE fileId:  + handle.getFileId() +  offset: 
   + offset +  length: + count +  stableHow: + stableHow.getValue()
-  +  xid: + xid);
+  +  xid: + xid +  client: + remoteAddress);
 }
 
 Nfs3FileAttributes preOpAttr = null;
@@ -936,7 +940,7 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 String fileName = request.getName();
 if (LOG.isDebugEnabled()) {
   LOG.debug(NFS CREATE dir fileId:  + dirHandle.getFileId()
-  +  filename:  + fileName);
+  +  filename:  + fileName +  client: + remoteAddress);
 }
 
 int createMode = request.getMode();
@@ -1067,6 +1071,10 @@ public class RpcProgramNfs3 extends RpcProgram 
implements Nfs3Interface {
 }
 FileHandle dirHandle = request.getHandle();
 String fileName = request.getName();
+ 

hadoop git commit: HDFS-7640. print NFS Client in the NFS log. Contributed by Brandon Li.

2015-01-19 Thread wheat9
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 ef6fc24df - 755731a6c


HDFS-7640. print NFS Client in the NFS log. Contributed by Brandon Li.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/755731a6
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/755731a6
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/755731a6

Branch: refs/heads/branch-2
Commit: 755731a6c1b8dc1aa1495597a6eb9b8415b5b6db
Parents: ef6fc24
Author: Haohui Mai whe...@apache.org
Authored: Mon Jan 19 17:29:46 2015 -0800
Committer: Haohui Mai whe...@apache.org
Committed: Mon Jan 19 17:29:57 2015 -0800

--
 .../hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java| 53 +---
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt |  2 +
 2 files changed, 36 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/755731a6/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
 
b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
index 148d4f7..9204c4d 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/RpcProgramNfs3.java
@@ -330,8 +330,9 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 }
 
 FileHandle handle = request.getHandle();
-if (LOG.isTraceEnabled()) {
-  LOG.trace(GETATTR for fileId:  + handle.getFileId());
+if (LOG.isDebugEnabled()) {
+  LOG.debug(GETATTR for fileId:  + handle.getFileId() +  client:
+  + remoteAddress);
 }
 
 Nfs3FileAttributes attrs = null;
@@ -423,7 +424,8 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 
 FileHandle handle = request.getHandle();
 if (LOG.isDebugEnabled()) {
-  LOG.debug(NFS SETATTR fileId:  + handle.getFileId());
+  LOG.debug(NFS SETATTR fileId:  + handle.getFileId() +  client:
+  + remoteAddress);
 }
 
 if (request.getAttr().getUpdateFields().contains(SetAttrField.SIZE)) {
@@ -509,7 +511,7 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 String fileName = request.getName();
 if (LOG.isDebugEnabled()) {
   LOG.debug(NFS LOOKUP dir fileId:  + dirHandle.getFileId() +  name: 
-  + fileName);
+  + fileName +  client: + remoteAddress);
 }
 
 try {
@@ -577,7 +579,8 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 Nfs3FileAttributes attrs;
 
 if (LOG.isDebugEnabled()) {
-  LOG.debug(NFS ACCESS fileId:  + handle.getFileId());
+  LOG.debug(NFS ACCESS fileId:  + handle.getFileId() +  client:
+  + remoteAddress);
 }
 
 try {
@@ -643,7 +646,8 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 
 FileHandle handle = request.getHandle();
 if (LOG.isDebugEnabled()) {
-  LOG.debug(NFS READLINK fileId:  + handle.getFileId());
+  LOG.debug(NFS READLINK fileId:  + handle.getFileId() +  client:
+  + remoteAddress);
 }
 
 String fileIdPath = Nfs3Utils.getFileIdPath(handle);
@@ -722,7 +726,7 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 FileHandle handle = request.getHandle();
 if (LOG.isDebugEnabled()) {
   LOG.debug(NFS READ fileId:  + handle.getFileId() +  offset:  + offset
-  +  count:  + count);
+  +  count:  + count +  client: + remoteAddress);
 }
 
 Nfs3FileAttributes attrs;
@@ -863,7 +867,7 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 if (LOG.isDebugEnabled()) {
   LOG.debug(NFS WRITE fileId:  + handle.getFileId() +  offset: 
   + offset +  length: + count +  stableHow: + stableHow.getValue()
-  +  xid: + xid);
+  +  xid: + xid +  client: + remoteAddress);
 }
 
 Nfs3FileAttributes preOpAttr = null;
@@ -936,7 +940,7 @@ public class RpcProgramNfs3 extends RpcProgram implements 
Nfs3Interface {
 String fileName = request.getName();
 if (LOG.isDebugEnabled()) {
   LOG.debug(NFS CREATE dir fileId:  + dirHandle.getFileId()
-  +  filename:  + fileName);
+  +  filename:  + fileName +  client: + remoteAddress);
 }
 
 int createMode = request.getMode();
@@ -1067,6 +1071,10 @@ public class RpcProgramNfs3 extends RpcProgram 
implements Nfs3Interface {
 }
 FileHandle dirHandle = request.getHandle();
 String fileName =