You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "David Dobbins (JIRA)" <ji...@apache.org> on 2015/06/10 15:51:00 UTC
[jira] [Created] (HADOOP-12080) swiftfs ls fails with NPE for dirs
with single file
David Dobbins created HADOOP-12080:
--------------------------------------
Summary: swiftfs ls fails with NPE for dirs with single file
Key: HADOOP-12080
URL: https://issues.apache.org/jira/browse/HADOOP-12080
Project: Hadoop Common
Issue Type: Bug
Components: fs/swift
Affects Versions: 2.3.0
Reporter: David Dobbins
Assignee: David Dobbins
Priority: Minor
NPE from Globber.java (line 230) if a directory has only one child *and* there is no explicit parent directory object.
To reproduce, create an object in swift directly (not using swiftfs), e.g. /foo/bar/baz in container test. Then, try to ls the "directory" for that object:
hdfs dfs -ls swift://test.myswift/foo/bar/*
This fails for dirs containing single files because in Globber.java there is a specific test for objects with a single child. The getFileStatus() call returns null for the object's parent (because no explicit directory object was created in swift). However, Globber assumes that if the child exists getPath() will return an object that exist.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)