|
@@ -28,6 +28,7 @@ import java.util.Map;
|
|
import org.apache.hadoop.conf.Configuration;
|
|
import org.apache.hadoop.conf.Configuration;
|
|
import org.apache.hadoop.fs.permission.FsPermission;
|
|
import org.apache.hadoop.fs.permission.FsPermission;
|
|
import org.apache.hadoop.hdfs.protocol.DatanodeInfo.AdminStates;
|
|
import org.apache.hadoop.hdfs.protocol.DatanodeInfo.AdminStates;
|
|
|
|
+import org.apache.hadoop.hdfs.protocol.LayoutFlags;
|
|
import org.apache.hadoop.hdfs.protocol.LayoutVersion;
|
|
import org.apache.hadoop.hdfs.protocol.LayoutVersion;
|
|
import org.apache.hadoop.hdfs.protocol.LayoutVersion.Feature;
|
|
import org.apache.hadoop.hdfs.protocol.LayoutVersion.Feature;
|
|
import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier;
|
|
import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier;
|
|
@@ -126,7 +127,7 @@ class ImageLoaderCurrent implements ImageLoader {
|
|
new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
private static int[] versions = { -16, -17, -18, -19, -20, -21, -22, -23,
|
|
private static int[] versions = { -16, -17, -18, -19, -20, -21, -22, -23,
|
|
-24, -25, -26, -27, -28, -30, -31, -32, -33, -34, -35, -36, -37, -38, -39,
|
|
-24, -25, -26, -27, -28, -30, -31, -32, -33, -34, -35, -36, -37, -38, -39,
|
|
- -40, -41, -42, -43, -44, -45, -46, -47, -48, -49 };
|
|
|
|
|
|
+ -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50 };
|
|
private int imageVersion = 0;
|
|
private int imageVersion = 0;
|
|
|
|
|
|
private final Map<Long, Boolean> subtreeMap = new HashMap<Long, Boolean>();
|
|
private final Map<Long, Boolean> subtreeMap = new HashMap<Long, Boolean>();
|
|
@@ -157,6 +158,9 @@ class ImageLoaderCurrent implements ImageLoader {
|
|
imageVersion = in.readInt();
|
|
imageVersion = in.readInt();
|
|
if( !canLoadVersion(imageVersion))
|
|
if( !canLoadVersion(imageVersion))
|
|
throw new IOException("Cannot process fslayout version " + imageVersion);
|
|
throw new IOException("Cannot process fslayout version " + imageVersion);
|
|
|
|
+ if (LayoutVersion.supports(Feature.ADD_LAYOUT_FLAGS, imageVersion)) {
|
|
|
|
+ LayoutFlags.read(in);
|
|
|
|
+ }
|
|
|
|
|
|
v.visit(ImageElement.IMAGE_VERSION, imageVersion);
|
|
v.visit(ImageElement.IMAGE_VERSION, imageVersion);
|
|
v.visit(ImageElement.NAMESPACE_ID, in.readInt());
|
|
v.visit(ImageElement.NAMESPACE_ID, in.readInt());
|