hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aajis...@apache.org
Subject hadoop git commit: HDFS-10572. Fix TestOfflineEditsViewer#testGenerated. Contributed by Surendra Singh Lilhore.
Date Mon, 04 Jul 2016 04:17:48 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 8b281bce8 -> 2e835d986


HDFS-10572. Fix TestOfflineEditsViewer#testGenerated. Contributed by Surendra Singh Lilhore.


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

Branch: refs/heads/trunk
Commit: 2e835d986ecdc881eab3ab9650d854b6df482b20
Parents: 8b281bc
Author: Akira Ajisaka <aajisaka@apache.org>
Authored: Sun Jul 3 21:11:56 2016 -0700
Committer: Akira Ajisaka <aajisaka@apache.org>
Committed: Sun Jul 3 21:11:56 2016 -0700

----------------------------------------------------------------------
 .../hadoop/hdfs/server/namenode/FSImageSerialization.java   | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/2e835d98/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageSerialization.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageSerialization.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageSerialization.java
index 5f6c96a..fd2700b 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageSerialization.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageSerialization.java
@@ -698,6 +698,7 @@ public class FSImageSerialization {
     final Long limit = info.getLimit();
     final FsPermission mode = info.getMode();
     final Long maxRelativeExpiry = info.getMaxRelativeExpiryMs();
+    final Short defaultReplication = info.getDefaultReplication();
 
     if (ownerName != null) {
       XMLUtils.addSaxString(contentHandler, "OWNERNAME", ownerName);
@@ -716,6 +717,10 @@ public class FSImageSerialization {
       XMLUtils.addSaxString(contentHandler, "MAXRELATIVEEXPIRY",
           Long.toString(maxRelativeExpiry));
     }
+    if (defaultReplication != null) {
+      XMLUtils.addSaxString(contentHandler, "DEFAULTREPLICATION",
+          Short.toString(defaultReplication));
+    }
   }
 
   public static CachePoolInfo readCachePoolInfo(Stanza st)
@@ -738,6 +743,10 @@ public class FSImageSerialization {
       info.setMaxRelativeExpiryMs(
           Long.parseLong(st.getValue("MAXRELATIVEEXPIRY")));
     }
+    if (st.hasChildren("DEFAULTREPLICATION")) {
+      info.setDefaultReplication(Short.parseShort(st
+          .getValue("DEFAULTREPLICATION")));
+    }
     return info;
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message