Repository: hadoop Updated Branches: refs/heads/branch-2 fb9327eda -> 5057390ca
HDFS-10572. Fix TestOfflineEditsViewer#testGenerated. Contributed by Surendra Singh Lilhore. (cherry picked from commit 2e835d986ecdc881eab3ab9650d854b6df482b20) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5057390c Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5057390c Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5057390c Branch: refs/heads/branch-2 Commit: 5057390cad229fa007bbf3c72d61749d7f9d8cf9 Parents: fb9327e Author: Akira Ajisaka <[email protected]> Authored: Sun Jul 3 21:11:56 2016 -0700 Committer: Akira Ajisaka <[email protected]> Committed: Sun Jul 3 21:12:37 2016 -0700 ---------------------------------------------------------------------- .../hadoop/hdfs/server/namenode/FSImageSerialization.java | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/5057390c/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 8df65f7..6475627 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 @@ -696,6 +696,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); @@ -714,6 +715,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) @@ -736,6 +741,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: [email protected] For additional commands, e-mail: [email protected]
