You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by xypod-ii <un...@o2.pl> on 2011/03/02 11:53:50 UTC

FileSystem.exists() returns false when querying for the directory (Linux)

Hello,

I've got a following problem - I'm extending HadoopTestCase to test some
functionality.
The test creates some files and directories in tmp directory, then performs
some actions, and fileSystem.exists() method is being used.
This works perfectly for files and under Windows also for directories.
The thing is that under Linux, when I'm checking for the existence of
/tmp/hdfs-test/to-copy directory (which is there physically), exists()
method always returns false.
Am I missing something? Do I need to do any additional configuration of the
LocalFileSystem being used in the test case?

Any help will be greatly appreciated.

Thanks,
x
-- 
View this message in context: http://old.nabble.com/FileSystem.exists%28%29-returns-false-when-querying-for-the-directory-%28Linux%29-tp31048308p31048308.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Re: FileSystem.exists() returns false when querying for the directory (Linux)

Posted by Harsh J <qw...@gmail.com>.
Could you post your test case demonstrating this?

TestLocalFileSystem entirely passes on my Linux desktop box, via ant -
and it does contain various directory exists tests.

Also, are you sure that your created FS instance is LocalFileSystem
and not something else?

On Wed, Mar 2, 2011 at 4:23 PM, xypod-ii <un...@o2.pl> wrote:
>
> Hello,
>
> I've got a following problem - I'm extending HadoopTestCase to test some
> functionality.
> The test creates some files and directories in tmp directory, then performs
> some actions, and fileSystem.exists() method is being used.
> This works perfectly for files and under Windows also for directories.
> The thing is that under Linux, when I'm checking for the existence of
> /tmp/hdfs-test/to-copy directory (which is there physically), exists()
> method always returns false.
> Am I missing something? Do I need to do any additional configuration of the
> LocalFileSystem being used in the test case?
>
> Any help will be greatly appreciated.
>
> Thanks,
> x
> --
> View this message in context: http://old.nabble.com/FileSystem.exists%28%29-returns-false-when-querying-for-the-directory-%28Linux%29-tp31048308p31048308.html
> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>
>



-- 
Harsh J
www.harshj.com