hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gif...@apache.org
Subject hadoop git commit: HDFS-14007. Incompatible layout when generating FSImage. Contributed by Inigo Goiri.
Date Fri, 19 Oct 2018 00:24:50 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 66f059ed1 -> cc09b2b0c


HDFS-14007. Incompatible layout when generating FSImage. Contributed by Inigo Goiri.


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

Branch: refs/heads/trunk
Commit: cc09b2b0c7e9efa45c17d93d9ae1fcda8e050965
Parents: 66f059e
Author: Giovanni Matteo Fumarola <gifuma@apache.org>
Authored: Thu Oct 18 17:24:23 2018 -0700
Committer: Giovanni Matteo Fumarola <gifuma@apache.org>
Committed: Thu Oct 18 17:24:23 2018 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hdfs/server/namenode/ImageWriter.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/cc09b2b0/hadoop-tools/hadoop-fs2img/src/main/java/org/apache/hadoop/hdfs/server/namenode/ImageWriter.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-fs2img/src/main/java/org/apache/hadoop/hdfs/server/namenode/ImageWriter.java
b/hadoop-tools/hadoop-fs2img/src/main/java/org/apache/hadoop/hdfs/server/namenode/ImageWriter.java
index 14a5f8f..d4a632c 100644
--- a/hadoop-tools/hadoop-fs2img/src/main/java/org/apache/hadoop/hdfs/server/namenode/ImageWriter.java
+++ b/hadoop-tools/hadoop-fs2img/src/main/java/org/apache/hadoop/hdfs/server/namenode/ImageWriter.java
@@ -79,7 +79,8 @@ import static org.apache.hadoop.hdfs.server.namenode.FSImageUtil.MAGIC_HEADER;
 public class ImageWriter implements Closeable {
 
   private static final int ONDISK_VERSION = 1;
-  private static final int LAYOUT_VERSION = -64; // see NameNodeLayoutVersion
+  private static final int LAYOUT_VERSION =
+      NameNodeLayoutVersion.CURRENT_LAYOUT_VERSION;
 
   private final Path outdir;
   private final FileSystem outfs;
@@ -128,7 +129,7 @@ public class ImageWriter implements Closeable {
         NamespaceInfo info = NNStorage.newNamespaceInfo();
         if (info.getLayoutVersion() != LAYOUT_VERSION) {
           throw new IllegalStateException("Incompatible layout " +
-              info.getLayoutVersion() + " (expected " + LAYOUT_VERSION);
+              info.getLayoutVersion() + " (expected " + LAYOUT_VERSION + ")");
         }
         // set the cluster id, if given
         if (opts.clusterID.length() > 0) {


---------------------------------------------------------------------
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