AnsweredAssumed Answered

Symbolic links : ERROR Client fs/client/fileclient/cc/client.cc:1448 Thread: 9304 Open failed for file...

Question asked by taccart on May 21, 2015
Latest reply on May 21, 2015 by taccart
Hi

I'm trying to use symbolic links in MapR sandbox but I face error accessing them in HDFS.

Here's a scenario to reproduce problem:

1-Create a dir and a file inside dir:

> hadoop fs -mkdir aDir

> hadoop fs -touchz aDir/aFile.txt

2-Create the link to aDir

> hadoop mfs -ln aDir aHadoopLinkTo_aDir

3-Try to use the link in NFS
> ls /mapr/demo.mapr.com/user/mapr/aHadoopLinkTo_aDir/aFile.txt

*So far, so good.*

4.1-Try to use the link in HDFS

> hadoop fs -ls aHadoopLinkTo_aDir/aFile.txt

fail with message
> ls: `aHadoopLinkTo_aDir/aFile': No such file or directory

4.2-Try to get link info inHDFS :

> hadoop mfs -Lsr aHadoopLinkTo_aDir

fails with message

>2015-05-21 10:50:36,1574 ERROR Client fs/client/fileclient/cc/client.cc:1448 Thread: 9304 Open failed for file /user/mapr/aHadoopLinkTo_aDir, LookupFid error No such file or directory(2)

>2015-05-21 10:50:36,1576 ERROR JniCommon fs/client/fileclient/cc/jni_MapRClient.cc:1846 Thread: 9304 getBlockInfo failed, Could not open file /user/mapr/aHadoopLinkTo_aDir
>-rw-rw-r-- Z U   1 mapr mapr         15 2015-05-21 10:49  268435456 /user/mapr/aDir/aFile               p 2057.42.262536  maprdemo:5660


It's really a weird error : the *mfs -Lsr* command raises an error on
*Open failed for file /user/mapr/aHadoopLinkTo_aDir*, which is the link, but in same time, it manages to ouput this *-rw-rw-r-- Z U   1 mapr mapr         15 2015-05-21 10:49  268435456 /user/mapr/**aDir/aFile** * meaning that the link has been resolved, and even more, content of source directory is  listed

Even weird : everythink is fine from a NFS point of view:
> ls -l /mapr/demo.mapr.com/user/mapr/
lists

> drwxr-xr-x 2 mapr mapr 2 May 21 11:00  aDir
>
> lrwxrwxrwx 1 mapr mapr 5 May 21 10:48  aHadoopLinkTo_aDir -> aDir

Any help to resolve this link problem will be warmly welcomed.

























Outcomes