Solr
  1. Solr
  2. SOLR-6907

URLEncode documents directory in MorphlineMapperTest to handle spaces etc. in file name

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0, 6.0
    • Component/s: contrib - MapReduce, Tests
    • Labels:
      None

      Description

      Currently the test fails if the source is checked out on a directory whose path contains, say spaces..

      1. SOLR-6907.patch
        1 kB
        Erick Erickson
      2. SOLR-6907-2.patch
        0.9 kB
        Ramkumar Aiyengar

        Activity

        Hide
        ASF GitHub Bot added a comment -

        GitHub user andyetitmoves opened a pull request:

        https://github.com/apache/lucene-solr/pull/124

        URLEncode documents directory in MorphlineMapperTest

        https://issues.apache.org/jira/browse/SOLR-6907

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/bloomberg/lucene-solr trunk-url-encode-hdfs-paths

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/lucene-solr/pull/124.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #124


        commit ae0009e1c9077caebaef05adee8595bf4aef1e6e
        Author: Ramkumar Aiyengar <andyetitmoves@gmail.com>
        Date: 2015-01-03T14:41:28Z

        URLEncode documents directory in MorphlineMapperTest


        Show
        ASF GitHub Bot added a comment - GitHub user andyetitmoves opened a pull request: https://github.com/apache/lucene-solr/pull/124 URLEncode documents directory in MorphlineMapperTest https://issues.apache.org/jira/browse/SOLR-6907 You can merge this pull request into a Git repository by running: $ git pull https://github.com/bloomberg/lucene-solr trunk-url-encode-hdfs-paths Alternatively you can review and apply these changes as the patch at: https://github.com/apache/lucene-solr/pull/124.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #124 commit ae0009e1c9077caebaef05adee8595bf4aef1e6e Author: Ramkumar Aiyengar <andyetitmoves@gmail.com> Date: 2015-01-03T14:41:28Z URLEncode documents directory in MorphlineMapperTest
        Hide
        wolfgang hoschek added a comment -

        +1 Looks reasonable to me.

        Show
        wolfgang hoschek added a comment - +1 Looks reasonable to me.
        Hide
        Uwe Schindler added a comment - - edited

        I have never seen this issue on the famous "Uwe Schindler" username ... but windows disabled those tests

        In fact, URLEncoder is not the correct way to do it, because it use "+" for whitespace... Unfortunately, Java has no non-form-encoded URL encoder, so you would do .replace("+", "%20") (not replaceAll!!!! The CharSequence one!!!)

        Show
        Uwe Schindler added a comment - - edited I have never seen this issue on the famous "Uwe Schindler" username ... but windows disabled those tests In fact, URLEncoder is not the correct way to do it, because it use "+" for whitespace... Unfortunately, Java has no non-form-encoded URL encoder, so you would do .replace("+", "%20") (not replaceAll!!!! The CharSequence one!!!)
        Hide
        Ramkumar Aiyengar added a comment -

        Thanks Uwe, updated the patch. Curiously though the test did pass the first time around..

        Show
        Ramkumar Aiyengar added a comment - Thanks Uwe, updated the patch. Curiously though the test did pass the first time around..
        Hide
        ASF subversion and git services added a comment -

        Commit 1649383 from Erick Erickson in branch 'dev/trunk'
        [ https://svn.apache.org/r1649383 ]

        SOLR-6907: URLEncode documents directory in MorphlineMapperTest to handle spaces etc in file name

        Show
        ASF subversion and git services added a comment - Commit 1649383 from Erick Erickson in branch 'dev/trunk' [ https://svn.apache.org/r1649383 ] SOLR-6907 : URLEncode documents directory in MorphlineMapperTest to handle spaces etc in file name
        Hide
        Erick Erickson added a comment -

        Ramkumar's changes with CHANGES.txt entry.

        Show
        Erick Erickson added a comment - Ramkumar's changes with CHANGES.txt entry.
        Hide
        ASF subversion and git services added a comment -

        Commit 1649386 from Erick Erickson in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1649386 ]

        SOLR-6907: URLEncode documents directory in MorphlineMapperTest to handle spaces etc in file name

        Show
        ASF subversion and git services added a comment - Commit 1649386 from Erick Erickson in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1649386 ] SOLR-6907 : URLEncode documents directory in MorphlineMapperTest to handle spaces etc in file name
        Hide
        Erick Erickson added a comment -

        Thanks Ramkumar!

        Show
        Erick Erickson added a comment - Thanks Ramkumar!
        Hide
        Ramkumar Aiyengar added a comment -

        Erick, I think this contains the first version of the patch, without Uwe's suggestions..

        Show
        Ramkumar Aiyengar added a comment - Erick, I think this contains the first version of the patch, without Uwe's suggestions..
        Hide
        Erick Erickson added a comment -

        OK, could you create a proper patch file and attach it then? That's the usual way patches
        are submitted, and it allows the author to insure that the right code is current. It also
        keeps a permanent record of the change not dependent on an external repo.

        Once you do I'll commit it. Please make it a delta to the newly-committed code rather than
        from the original.

        Thanks,

        Show
        Erick Erickson added a comment - OK, could you create a proper patch file and attach it then? That's the usual way patches are submitted, and it allows the author to insure that the right code is current. It also keeps a permanent record of the change not dependent on an external repo. Once you do I'll commit it. Please make it a delta to the newly-committed code rather than from the original. Thanks,
        Hide
        Ramkumar Aiyengar added a comment -

        Here you go..

        Show
        Ramkumar Aiyengar added a comment - Here you go..
        Hide
        ASF subversion and git services added a comment -

        Commit 1649455 from Erick Erickson in branch 'dev/trunk'
        [ https://svn.apache.org/r1649455 ]

        SOLR-6907, corrected patch, URLEncode documents directory in MorphlineMapperTest to handle spaces etc in file name

        Show
        ASF subversion and git services added a comment - Commit 1649455 from Erick Erickson in branch 'dev/trunk' [ https://svn.apache.org/r1649455 ] SOLR-6907 , corrected patch, URLEncode documents directory in MorphlineMapperTest to handle spaces etc in file name
        Hide
        ASF subversion and git services added a comment -

        Commit 1649457 from Erick Erickson in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1649457 ]

        SOLR-6907, corrected patch, URLEncode documents directory in MorphlineMapperTest to handle spaces etc in file name

        Show
        ASF subversion and git services added a comment - Commit 1649457 from Erick Erickson in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1649457 ] SOLR-6907 , corrected patch, URLEncode documents directory in MorphlineMapperTest to handle spaces etc in file name
        Hide
        Erick Erickson added a comment -

        Done, thanks!

        Show
        Erick Erickson added a comment - Done, thanks!
        Hide
        ASF GitHub Bot added a comment -

        Github user andyetitmoves closed the pull request at:

        https://github.com/apache/lucene-solr/pull/124

        Show
        ASF GitHub Bot added a comment - Github user andyetitmoves closed the pull request at: https://github.com/apache/lucene-solr/pull/124
        Hide
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

        Show
        Anshum Gupta added a comment - Bulk close after 5.0 release.

          People

          • Assignee:
            Erick Erickson
            Reporter:
            Ramkumar Aiyengar
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development