Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-2143

HarFileSystem is not able to handle spaces in its path

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.22.0
    • Component/s: harchive
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      If the Path to the HAR contains spaces, Path.getFileSystem() fails. The problem is in HarFileSystem.initialize(), which uses URI.toString() to get a string for getting to the .har suffix. URI.toString() returns a percent-encoded string when the path contains spaces. When this string is subsequently used to get the _index file, we get a FileNotFoundException. The fix is to use URI.getPath().

      1. MAPREDUCE-2143.patch
        3 kB
        Ramkumar Vadali

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #643 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk/643/)

        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #643 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk/643/ )
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #523 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/523/)

        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #523 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/523/ )
        Hide
        dhruba borthakur added a comment -

        I just committed this. Thanks Ram!

        Show
        dhruba borthakur added a comment - I just committed this. Thanks Ram!
        Hide
        Ramkumar Vadali added a comment -

        Test Results

        ant test-patch

             [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 2 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]
             [exec]     +1 release audit.  The applied patch does not increase the total number of release audit warnings.
             [exec]
             [exec]     +1 system tests framework.  The patch passed system tests framework compile.
             [exec]
             [exec]
             [exec]
             [exec]
             [exec] ======================================================================
             [exec] ======================================================================
             [exec]     Finished build.
             [exec] ======================================================================
             [exec] ======================================================================
             [exec]
             [exec]
        

        ant test

        There were some unrelated failures that happen in a clean checkout as well.

            [junit] Test org.apache.hadoop.mapred.TestSequenceFileInputFormat FAILED
            [junit] Test org.apache.hadoop.io.TestSequenceFile FAILED
            [junit] Test org.apache.hadoop.mapred.TestControlledMapReduceJob FAILED (timeout)
            [junit] Test org.apache.hadoop.mapred.TestJobQueueInformation FAILED
            [junit] Test org.apache.hadoop.mapred.TestSequenceFileAsTextInputFormat FAILED
            [junit] Test org.apache.hadoop.mapred.TestSequenceFileInputFilter FAILED
            [junit] Test org.apache.hadoop.mapreduce.lib.input.TestMRSequenceFileAsTextInputFormat FAILED
            [junit] Test org.apache.hadoop.mapreduce.lib.input.TestMRSequenceFileInputFilter FAILED
        

        I ran ant test on a clean checkout and found that the failing tests fail on the clean checkout as well

        
        [rvadali@dev502 hadoop-mapred-trunk]$ svn st
        X      src/test/bin
        
        Performing status on external item at 'src/test/bin'
        [rvadali@dev502 hadoop-mapred-trunk]$ for i in TestSequenceFileInputFormat TestSequenceFile TestControlledMapReduceJob TestJobQueueInformation TestSequenceFileAsTextInputFormat TestSequenceFileInputFilter TestMRSequenceFileAsTextInputFormat TestMRSequenceFileInputFilter; do ant test -Dtestcase=$i 2>&1 > $i.log;done
            [junit] Test org.apache.hadoop.mapred.TestSequenceFileInputFormat FAILED
        
        BUILD FAILED
        /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed!
        
        Total time: 22 seconds
            [junit] Test org.apache.hadoop.io.TestSequenceFile FAILED
        
        BUILD FAILED
        /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed!
        
        Total time: 20 seconds
            [junit] Test org.apache.hadoop.mapred.TestControlledMapReduceJob FAILED (timeout)
        
        BUILD FAILED
        /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed!
        
        Total time: 15 minutes 16 seconds
            [junit] Test org.apache.hadoop.mapred.TestJobQueueInformation FAILED
        
        BUILD FAILED
        /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed!
        
        Total time: 43 seconds
            [junit] Test org.apache.hadoop.mapred.TestSequenceFileAsTextInputFormat FAILED
        
        BUILD FAILED
        /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed!
        
        Total time: 18 seconds
            [junit] Test org.apache.hadoop.mapred.TestSequenceFileInputFilter FAILED
        
        BUILD FAILED
        /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed!
        
        Total time: 19 seconds
            [junit] Test org.apache.hadoop.mapreduce.lib.input.TestMRSequenceFileAsTextInputFormat FAILED
        
        BUILD FAILED
        /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed!
        
        Total time: 20 seconds
            [junit] Test org.apache.hadoop.mapreduce.lib.input.TestMRSequenceFileInputFilter FAILED
        
        BUILD FAILED
        /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed!
        
        Total time: 24 seconds
        
        Show
        Ramkumar Vadali added a comment - Test Results ant test-patch [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 2 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] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. [exec] [exec] +1 system tests framework. The patch passed system tests framework compile. [exec] [exec] [exec] [exec] [exec] ====================================================================== [exec] ====================================================================== [exec] Finished build. [exec] ====================================================================== [exec] ====================================================================== [exec] [exec] ant test There were some unrelated failures that happen in a clean checkout as well. [junit] Test org.apache.hadoop.mapred.TestSequenceFileInputFormat FAILED [junit] Test org.apache.hadoop.io.TestSequenceFile FAILED [junit] Test org.apache.hadoop.mapred.TestControlledMapReduceJob FAILED (timeout) [junit] Test org.apache.hadoop.mapred.TestJobQueueInformation FAILED [junit] Test org.apache.hadoop.mapred.TestSequenceFileAsTextInputFormat FAILED [junit] Test org.apache.hadoop.mapred.TestSequenceFileInputFilter FAILED [junit] Test org.apache.hadoop.mapreduce.lib.input.TestMRSequenceFileAsTextInputFormat FAILED [junit] Test org.apache.hadoop.mapreduce.lib.input.TestMRSequenceFileInputFilter FAILED I ran ant test on a clean checkout and found that the failing tests fail on the clean checkout as well [rvadali@dev502 hadoop-mapred-trunk]$ svn st X src/test/bin Performing status on external item at 'src/test/bin' [rvadali@dev502 hadoop-mapred-trunk]$ for i in TestSequenceFileInputFormat TestSequenceFile TestControlledMapReduceJob TestJobQueueInformation TestSequenceFileAsTextInputFormat TestSequenceFileInputFilter TestMRSequenceFileAsTextInputFormat TestMRSequenceFileInputFilter; do ant test -Dtestcase=$i 2>&1 > $i.log;done [junit] Test org.apache.hadoop.mapred.TestSequenceFileInputFormat FAILED BUILD FAILED /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed! Total time: 22 seconds [junit] Test org.apache.hadoop.io.TestSequenceFile FAILED BUILD FAILED /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed! Total time: 20 seconds [junit] Test org.apache.hadoop.mapred.TestControlledMapReduceJob FAILED (timeout) BUILD FAILED /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed! Total time: 15 minutes 16 seconds [junit] Test org.apache.hadoop.mapred.TestJobQueueInformation FAILED BUILD FAILED /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed! Total time: 43 seconds [junit] Test org.apache.hadoop.mapred.TestSequenceFileAsTextInputFormat FAILED BUILD FAILED /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed! Total time: 18 seconds [junit] Test org.apache.hadoop.mapred.TestSequenceFileInputFilter FAILED BUILD FAILED /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed! Total time: 19 seconds [junit] Test org.apache.hadoop.mapreduce.lib.input.TestMRSequenceFileAsTextInputFormat FAILED BUILD FAILED /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed! Total time: 20 seconds [junit] Test org.apache.hadoop.mapreduce.lib.input.TestMRSequenceFileInputFilter FAILED BUILD FAILED /data/users/rvadali/apache/hadoop-mapred-trunk/build.xml:800: Tests failed! Total time: 24 seconds
        Hide
        dhruba borthakur added a comment -

        Thanks Mahadev. Ram: can you pl post HadoopQA results here?

        Show
        dhruba borthakur added a comment - Thanks Mahadev. Ram: can you pl post HadoopQA results here?
        Hide
        Mahadev konar added a comment -

        thanks dhruba. The patch looks good to me. +1.

        Show
        Mahadev konar added a comment - thanks dhruba. The patch looks good to me. +1.
        Hide
        dhruba borthakur added a comment -

        I added Mahadev to the watcher's list to see if he has any review comments about this one.

        Show
        dhruba borthakur added a comment - I added Mahadev to the watcher's list to see if he has any review comments about this one.
        Hide
        Ramkumar Vadali added a comment -

        This patch has a unit-test that shows the problem. It also contains a fix that seems to work with existing unit-tests also.
        I have also tested this in production

        Show
        Ramkumar Vadali added a comment - This patch has a unit-test that shows the problem. It also contains a fix that seems to work with existing unit-tests also. I have also tested this in production

          People

          • Assignee:
            Ramkumar Vadali
            Reporter:
            Ramkumar Vadali
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development