Hadoop Common
  1. Hadoop Common
  2. HADOOP-3716

KFS listStatus() returns NULL on empty directories

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.15.3, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.16.4, 0.17.0
    • Fix Version/s: 0.18.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      KosmosFileSystem listStatus() API incorrectly returns NULL on a valid directory, that is empty.

      1. patch.3716
        3 kB
        Sriram Rao

        Issue Links

          Activity

          Hide
          Sriram Rao added a comment -

          Patch that fixes the issue is attached.

          Show
          Sriram Rao added a comment - Patch that fixes the issue is attached.
          Hide
          Sriram Rao added a comment -

          A patch that fixes the issue is attached.

          There is no new test included with this submission. This is because testing of this code requires a KFS deployment and that is done elsewhere.

          Show
          Sriram Rao added a comment - A patch that fixes the issue is attached. There is no new test included with this submission. This is because testing of this code requires a KFS deployment and that is done elsewhere.
          Hide
          Lohit Vijayarenu added a comment -

          +1 This looks good. Not sure how TestKosmosFileSystem works, but easy enough to add a check?

          Show
          Lohit Vijayarenu added a comment - +1 This looks good. Not sure how TestKosmosFileSystem works, but easy enough to add a check?
          Hide
          Tom White added a comment -

          You could subclass FileSystemContractBaseTest and get this and lots of other tests for free. See TestHDFSFileSystemContract for an example of what to do.

          Show
          Tom White added a comment - You could subclass FileSystemContractBaseTest and get this and lots of other tests for free. See TestHDFSFileSystemContract for an example of what to do.
          Hide
          Sriram Rao added a comment -

          Updated the patch with a test.

          Show
          Sriram Rao added a comment - Updated the patch with a test.
          Hide
          Lohit Vijayarenu added a comment -

          +1. Toms suggestion is good, may be could track it in another JIRA.

          Show
          Lohit Vijayarenu added a comment - +1. Toms suggestion is good, may be could track it in another JIRA.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12385538/patch.3716
          against trunk revision 675078.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 6 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          -1 findbugs. The patch appears to cause Findbugs to fail.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The patch failed core unit tests.

          -1 contrib tests. The patch failed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2821/testReport/
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2821/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2821/console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12385538/patch.3716 against trunk revision 675078. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 6 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to cause Findbugs to fail. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2821/testReport/ Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2821/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2821/console This message is automatically generated.
          Hide
          Sriram Rao added a comment -

          Updated patch for inclusion.

          Show
          Sriram Rao added a comment - Updated patch for inclusion.
          Hide
          Sriram Rao added a comment -

          Updated patch with a testcase for the new code is attached.

          Show
          Sriram Rao added a comment - Updated patch with a testcase for the new code is attached.
          Hide
          Lohit Vijayarenu added a comment -

          Updated patch looks good.
          test-patch passes and also the Kosmos related testcase.
          [exec]
          [exec] +1 overall.
          [exec]
          [exec] +1 @author. The patch does not contain any @author tags.
          [exec]
          [exec] +1 tests included. The patch appears to include 6 new or modified tests.
          [exec]
          [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
          [exec]
          [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
          [exec]
          [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
          [exec]

          test-core:
          [mkdir] Created dir: /home/lohit/tmp/hadoop-core-trunk/build/test/data
          [mkdir] Created dir: /home/lohit/tmp/hadoop-core-trunk/build/test/logs
          [junit] Running org.apache.hadoop.fs.kfs.TestKosmosFileSystem
          [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.481 sec

          It should be good to commit not waiting for hudson.

          Show
          Lohit Vijayarenu added a comment - Updated patch looks good. test-patch passes and also the Kosmos related testcase. [exec] [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 6 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] test-core: [mkdir] Created dir: /home/lohit/tmp/hadoop-core-trunk/build/test/data [mkdir] Created dir: /home/lohit/tmp/hadoop-core-trunk/build/test/logs [junit] Running org.apache.hadoop.fs.kfs.TestKosmosFileSystem [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.481 sec It should be good to commit not waiting for hudson.
          Hide
          Chris Douglas added a comment -

          I just committed this. Thanks, Sriram

          Show
          Chris Douglas added a comment - I just committed this. Thanks, Sriram
          Hide
          Hudson added a comment -
          Show
          Hudson added a comment - Integrated in Hadoop-trunk #581 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/581/ )

            People

            • Assignee:
              Sriram Rao
              Reporter:
              Sriram Rao
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development