Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
We can downgrade NN during roling upgrade (runned "hdfs dfsadmin -rollingUpgrade prepare) with HDFS-8432 involved. But with HDFS-14172 if the image has any unrecogized section, it will throw IOException at
FSImageFormatProtobuf.java
private void loadInternal(......) { ...... String n = s.getName(); SectionName sectionName = SectionName.fromString(n); if (sectionName == null) { throw new IOException("Unrecognized section " + n); } ...... }
and throw NPE on Hadoop 2.x
FSImageFormatProtobuf.java
private void loadInternal(......) { ...... String n = s.getName(); switch (sectionName) ...... }
When we downgrade NN from 3.x to 2.x, NN may load the image saved by 3.x NN. Then the lack of SectionName.ERASURE_CODING can break 2.x NN.
We should just skip the unrecogized section instead of throwing exception.
Attachments
Issue Links
- is duplicated by
-
HDFS-14396 Failed to load image from FSImageFile when downgrade from 3.x to 2.x
- Resolved
- links to