From hdfs-dev-return-36930-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Thu Jun 6 12:41:04 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8B48C18062B for ; Thu, 6 Jun 2019 14:41:04 +0200 (CEST) Received: (qmail 19402 invoked by uid 500); 6 Jun 2019 12:41:02 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 19272 invoked by uid 99); 6 Jun 2019 12:41:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jun 2019 12:41:02 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C2EB8E2D2D for ; Thu, 6 Jun 2019 12:41:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id CECD7245BF for ; Thu, 6 Jun 2019 12:41:00 +0000 (UTC) Date: Thu, 6 Jun 2019 12:41:00 +0000 (UTC) From: "Yuxuan Wang (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-14551) NN throws NPE if downgrade it during rolling upgrade from 3.x to 2.x MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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: hdfs-dev-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org