ayushtkn commented on pull request #2061:
URL: https://github.com/apache/hadoop/pull/2061#issuecomment-640296733


   Thanx @umamaheswararao for the fix.
   Technically speaking, I think isDir should be taken from the destination 
only at least here in case of ViewFs. Some applications relies on checking 
isDir, I guess for ls -R we too check isDir only.
   I tried some stuff, and it gave responses as isDirectory true as well as 
symlink true. 
   ```
   lrwxrwxrwx  1 ayush ayush    4 Jun  8 04:25 sym_dir -> dir/
   ayush@ayushpc:~/test_sym$ ../hadoop/ayush_isDir.bash sym_dir
   sym_dir is directory.
   sym_dir is not file.
   sym_dir is symlink.
   ayush@ayushpc:~/test_sym$ cat ../hadoop/ayush_isDir.bash 
   if [ -d $1 ] 
   then
       echo "$1 is directory." 
   else
       echo "$1 is not directory."
   fi
   
   if [ -f $1 ] 
   then
       echo "$1 is file." 
   else
       echo "$1 is not file."it 
   fi
   
   if [ -L $1 ] 
   then
       echo "$1 is symlink." 
   else
       echo "$1 is not symlink."
   fi
   ayush@ayushpc:~/test_sym$ 
    ```
   Similar stuff happens if it is file, it tells isDirectory false and File as 
true.
   
   But the only doubt I have regarding the assertions, this was explicitly done 
as part of HADOOP-7032 and other one in HADOOP-15289, There should be some 
reason behind that?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to