Skip to content

Commit 36cc9dc

Browse files
author
wuxiaobao
committed
HDFS-17524. OIV: add Transformed processor which reconstructs a fsimage from another fsimage file
1 parent 87cc2f1 commit 36cc9dc

File tree

8 files changed

+1017
-5
lines changed

8 files changed

+1017
-5
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/AclEntryStatusFormat.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,8 @@ private static SerialNumberManager getSerialNumberManager(AclEntryType type) {
134134
public int getLength() {
135135
return BITS.getLength();
136136
}
137+
138+
public LongBitFormat getBitFormat() {
139+
return BITS;
140+
}
137141
}

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeWithAdditionalFields.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public abstract class INodeWithAdditionalFields extends INode
3535
implements LinkedElement {
3636
// Note: this format is used both in-memory and on-disk. Changes will be
3737
// incompatible.
38-
enum PermissionStatusFormat implements LongBitFormat.Enum {
38+
public enum PermissionStatusFormat implements LongBitFormat.Enum {
3939
MODE(null, 16),
4040
GROUP(MODE.BITS, 24),
4141
USER(GROUP.BITS, 24);
@@ -93,6 +93,10 @@ static PermissionStatus toPermissionStatus(long id,
9393
public int getLength() {
9494
return BITS.getLength();
9595
}
96+
97+
public LongBitFormat getBitFormat() {
98+
return BITS;
99+
}
96100
}
97101

98102
/** The inode id. */

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/XAttrFormat.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public int getLength() {
6161
return BITS.getLength();
6262
}
6363

64+
public LongBitFormat getBitFormat() {
65+
return BITS;
66+
}
6467
static XAttr.NameSpace getNamespace(int record) {
6568
long nid = NS.BITS.retrieve(record);
6669
nid |= NS_EXT.BITS.retrieve(record) << NS_EXT_SHIFT;

0 commit comments

Comments
 (0)