Yuxuan Wang created HDFS-14551:
----------------------------------
Summary: NN throws NPE if downgrade it during rolling upgrade from
3.x to 2.x
Key: HDFS-14551
URL: https://issues.apache.org/jira/browse/HDFS-14551
Project: Hadoop HDFS
Issue Type: Bug
Reporter: Yuxuan Wang
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
{code:title=FSImageFormatProtobuf.java|borderStyle=solid}
private void loadInternal(......) {
......
String n = s.getName();
SectionName sectionName = SectionName.fromString(n);
if (sectionName == null) {
throw new IOException("Unrecognized section " + n);
}
......
}
{code}
and throw NPE on Hadoop 2.x
{code:title=FSImageFormatProtobuf.java|borderStyle=solid}
private void loadInternal(......) {
......
String n = s.getName();
switch (sectionName)
......
}
{code}
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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]