HDFS-17151. EC: Fix wrong metadata in BlockInfoStriped after recovery. (#5938). Contributed by Shuyan Zhang.
Signed-off-by: He Xiaoqiao <hexiaoqiao@apache.org>
This commit is contained in:
parent
7368226332
commit
60867de422
@ -468,9 +468,9 @@ protected void recover() throws IOException {
|
|||||||
// notify Namenode the new size and locations
|
// notify Namenode the new size and locations
|
||||||
final DatanodeID[] newLocs = new DatanodeID[totalBlkNum];
|
final DatanodeID[] newLocs = new DatanodeID[totalBlkNum];
|
||||||
final String[] newStorages = new String[totalBlkNum];
|
final String[] newStorages = new String[totalBlkNum];
|
||||||
for (int i = 0; i < blockIndices.length; i++) {
|
for (int i = 0; i < newLocs.length; i++) {
|
||||||
newLocs[blockIndices[i]] = DatanodeID.EMPTY_DATANODE_ID;
|
newLocs[i] = DatanodeID.EMPTY_DATANODE_ID;
|
||||||
newStorages[blockIndices[i]] = "";
|
newStorages[i] = "";
|
||||||
}
|
}
|
||||||
for (BlockRecord r : rurList) {
|
for (BlockRecord r : rurList) {
|
||||||
int index = (int) (r.rInfo.getBlockId() &
|
int index = (int) (r.rInfo.getBlockId() &
|
||||||
|
Loading…
Reference in New Issue
Block a user