[ https://issues.apache.org/jira/browse/HDFS-14551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yuxuan Wang resolved HDFS-14551. -------------------------------- Resolution: Duplicate > 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 > Priority: Blocker > > 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.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org