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 "Ravi Phulari (JIRA)" <ji...@apache.org> on 2010/04/29 21:34:57 UTC

[jira] Updated: (HADOOP-6730) Bug in FileContext#copy

     [ https://issues.apache.org/jira/browse/HADOOP-6730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ravi Phulari updated HADOOP-6730:
---------------------------------

        Summary: Bug in FileContext#copy  (was: FileContext#copy needs unit tests)
    Description: 
Thanks to Eli, He noticed that there is no test for FileContext#Copy operation. 

On further investigation with the help of Sanjay we found that there is bug in FileContext#checkDest.

{noformat}
  FileStatus dstFs = getFileStatus(dst);
    try {
      if (dstFs.isDir()) {
        if (null == srcNa
{noformat}


 *FileStatus dstFs = getFileStatus(dst);* should be in try...catch block.

{noformat}
    try {
       FileStatus dstFs = getFileStatus(dst);
       if (dstFs.isDir()) {
          if (null == srcNa
{noformat}




  was:I modifed FileContext#checkDest in HADOOP-6678 and noticed it's only caller FileContext#copy has no callers itself. It needs unit tests.


Adding information about bug in FileContext#checkDest. 

Will upload patch soon with bug fix and Tests for copy.

> Bug in FileContext#copy
> -----------------------
>
>                 Key: HADOOP-6730
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6730
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.22.0
>            Reporter: Eli Collins
>            Assignee: Ravi Phulari
>             Fix For: 0.22.0
>
>
> Thanks to Eli, He noticed that there is no test for FileContext#Copy operation. 
> On further investigation with the help of Sanjay we found that there is bug in FileContext#checkDest.
> {noformat}
>   FileStatus dstFs = getFileStatus(dst);
>     try {
>       if (dstFs.isDir()) {
>         if (null == srcNa
> {noformat}
>  *FileStatus dstFs = getFileStatus(dst);* should be in try...catch block.
> {noformat}
>     try {
>        FileStatus dstFs = getFileStatus(dst);
>        if (dstFs.isDir()) {
>           if (null == srcNa
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.