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
|
||||
final DatanodeID[] newLocs = new DatanodeID[totalBlkNum];
|
||||
final String[] newStorages = new String[totalBlkNum];
|
||||
for (int i = 0; i < blockIndices.length; i++) {
|
||||
newLocs[blockIndices[i]] = DatanodeID.EMPTY_DATANODE_ID;
|
||||
newStorages[blockIndices[i]] = "";
|
||||
for (int i = 0; i < newLocs.length; i++) {
|
||||
newLocs[i] = DatanodeID.EMPTY_DATANODE_ID;
|
||||
newStorages[i] = "";
|
||||
}
|
||||
for (BlockRecord r : rurList) {
|
||||
int index = (int) (r.rInfo.getBlockId() &
|
||||
|
Loading…
Reference in New Issue
Block a user