Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1DAF4189C4 for ; Tue, 17 Nov 2015 04:49:12 +0000 (UTC) Received: (qmail 286 invoked by uid 500); 17 Nov 2015 04:49:11 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 190 invoked by uid 500); 17 Nov 2015 04:49:11 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 173 invoked by uid 99); 17 Nov 2015 04:49:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2015 04:49:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 46C0A2C1F5F for ; Tue, 17 Nov 2015 04:49:11 +0000 (UTC) Date: Tue, 17 Nov 2015 04:49:11 +0000 (UTC) From: "Hudson (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-9421) NNThroughputBenchmark replication test NPE with -namenode option MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-9421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15008034#comment-15008034 ] Hudson commented on HDFS-9421: ------------------------------ FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #609 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/609/]) HDFS-9421. NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e) * hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java * hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt > NNThroughputBenchmark replication test NPE with -namenode option > ---------------------------------------------------------------- > > Key: HDFS-9421 > URL: https://issues.apache.org/jira/browse/HDFS-9421 > Project: Hadoop HDFS > Issue Type: Bug > Components: benchmarks > Affects Versions: 2.8.0 > Reporter: Xiaoyu Yao > Assignee: Mingliang Liu > Fix For: 2.8.0 > > Attachments: HDFS-9241.000.patch > > > Hit the following NPE when reviewing fix for HDFS-9387 with manual tests as NNThroughputBenchmark currently does not have JUnit tests. > > {code} > HW11217:centos6.4 xyao$ hadoop org.apache.hadoop.hdfs.server.namenode.NNThroughputBenchmark -op replication -namenode hdfs://HW11217.local:9000 > 15/11/12 14:52:03 INFO namenode.NNThroughputBenchmark: Starting benchmark: replication > 15/11/12 14:52:03 ERROR namenode.NNThroughputBenchmark: java.lang.NullPointerException > at org.apache.hadoop.hdfs.server.namenode.NNThroughputBenchmark$ReplicationStats.generateInputs(NNThroughputBenchmark.java:1312) > at org.apache.hadoop.hdfs.server.namenode.NNThroughputBenchmark$OperationStatsBase.benchmark(NNThroughputBenchmark.java:280) > at org.apache.hadoop.hdfs.server.namenode.NNThroughputBenchmark.run(NNThroughputBenchmark.java:1509) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) > at org.apache.hadoop.hdfs.server.namenode.NNThroughputBenchmark.main(NNThroughputBenchmark.java:1534) > ... > {code} > However, the root cause is different from HDFS-9387. > From ReplicationStats#generateInputs, *nameNode* is uninitialized before use, which causes the NPE. > {code} > final FSNamesystem namesystem = nameNode.getNamesystem(); > {code} > From NNThroughputBenchmark#run, nameNode is only initialized when -namenode option is not specified. The fix is to initialize it properly in the else block when -namenode option is specified OR we should block this if it is not supported. > {code} > if (namenodeUri == null) { > nameNode = NameNode.createNameNode(argv, config); > NamenodeProtocols nnProtos = nameNode.getRpcServer(); > nameNodeProto = nnProtos; > clientProto = nnProtos; > dataNodeProto = nnProtos; > refreshUserMappingsProto = nnProtos; > bpid = nameNode.getNamesystem().getBlockPoolId(); > } else { > FileSystem.setDefaultUri(getConf(), namenodeUri); > DistributedFileSystem dfs = (DistributedFileSystem) > FileSystem.get(getConf()); > final URI nnUri = new URI(namenodeUri); > nameNodeProto = DFSTestUtil.getNamenodeProtocolProxy(config, nnUri, > UserGroupInformation.getCurrentUser()); > > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)