Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-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 2D24F182BC for ; Fri, 4 Mar 2016 00:31:42 +0000 (UTC) Received: (qmail 75662 invoked by uid 500); 4 Mar 2016 00:31:41 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 75579 invoked by uid 500); 4 Mar 2016 00:31:41 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 75203 invoked by uid 99); 4 Mar 2016 00:31:41 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2016 00:31:41 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0A5562C1F75 for ; Fri, 4 Mar 2016 00:31:41 +0000 (UTC) Date: Fri, 4 Mar 2016 00:31:41 +0000 (UTC) From: "Chris Nauroth (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-12717) NPE when trying to rename a directory in Windows Azure Storage FileSystem 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/HADOOP-12717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15179015#comment-15179015 ] Chris Nauroth commented on HADOOP-12717: ---------------------------------------- The proposed change makes sense to me. (Note that {{AzureNativeFileSystemStore#getDirectorySet}} also calls {{verifyAndConvertToStandardFormat}}, and that already has a similar null check.) bq. I'm not sure what test we can add It seems like you ought to be able to write a unit test that initializes an instance of {{AzureNativeFileSystemStore}} using configuration that would cause {{verifyAndConvertToStandardFormat}} to return {{null}}. Calling {{isAtomicRenameKey}} right after that would trigger a {{NullPointerException}} like shown in the issue description. Then, after applying the null check fix, that same test would no longer throw a {{NullPointerException}}, so the test would pass. Did you try exploring this? > NPE when trying to rename a directory in Windows Azure Storage FileSystem > ------------------------------------------------------------------------- > > Key: HADOOP-12717 > URL: https://issues.apache.org/jira/browse/HADOOP-12717 > Project: Hadoop Common > Issue Type: Bug > Affects Versions: 2.7.0 > Reporter: Robert Yokota > Assignee: Robert Yokota > Attachments: HADOOP-12717.001.patch, diff.txt > > > Encountered an NPE when trying to use the HBase utility ExportSnapshot with Azure as the target. > It turns out verifyAndConvertToStandardFormat is returning null when determining the hbaseRoot, and this is being added to the atomicRenameDirs set. > java.lang.NullPointerException > at org.apache.hadoop.fs.azure.AzureNativeFileSystemStore.isKeyForDirectorySet(AzureNativeFileSystemStore.java:1059) > at org.apache.hadoop.fs.azure.AzureNativeFileSystemStore.isAtomicRenameKey(AzureNativeFileSystemStore.java:1053) > at org.apache.hadoop.fs.azure.NativeAzureFileSystem.prepareAtomicFolderRename(NativeAzureFileSystem.java:2098) > at org.apache.hadoop.fs.azure.NativeAzureFileSystem.rename(NativeAzureFileSystem.java:1996) > at org.apache.hadoop.hbase.snapshot.ExportSnapshot.run(ExportSnapshot.java:944) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) > at com.yammer.calmie.snapshot.AbstractSnapshotUtil.exportSnapshot(AbstractSnapshotUtil.java:210) > at com.yammer.calmie.snapshot.AbstractSnapshotUtil.run(AbstractSnapshotUtil.java:79) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) > at com.yammer.calmie.snapshot.SnapshotAzureBlobUtil.main(SnapshotAzureBlobUtil.java:85) -- This message was sent by Atlassian JIRA (v6.3.4#6332)