Flume
  1. Flume
  2. FLUME-1920

Test case TestFileChannel fails when flume is built from paths containing the string "hadoop"

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: v1.3.0, v1.4.0, v1.3.1
    • Fix Version/s: None
    • Component/s: Test
    • Labels:
      None

      Description

      When flume is built from a path that contains the string "hadoop" (ie: /home/user/hadoop_components/flume), the test case TestFileChannel fails.

      The reason it fails is because it can't find the correct location of the hadoop jar file - the function findHadoopJar in TestFileChannel.java
      looks for the hadoop jar path by searching for the string "hadoop" in the property java.class.path, and returns the first match of the search.
      This is not necessarily the correct location of the hadoop jar.

      The right thing to do is to look for the name of the hadoop jar in the classpath (ie: hadoop-core-1.1.1.jar), instead of looking for the string "hadoop".

      1. FLUME-1920.patch
        2 kB
        Aline Guedes Pinto

        Activity

        Hide
        Mike Percy added a comment - - edited

        Thanks for the patch Aline! Would be great if you could update the patch per Hari's comments above. Cancelling patch available for the moment

        Show
        Mike Percy added a comment - - edited Thanks for the patch Aline! Would be great if you could update the patch per Hari's comments above. Cancelling patch available for the moment
        Hide
        Hari Shreedharan added a comment -

        Aline Guedes Pinto - The patch causes the build to fail with:

        [INFO] Scanning for projects...
        [ERROR] The build could not read 1 project -> [Help 1]
        [ERROR]   
        [ERROR]   The project  (/Users/hshreedharan/work/flume-latest/flume/flume-ng-tests/pom.xml) has 1 error
        [ERROR]     Non-parseable POM /Users/hshreedharan/work/flume-latest/flume/flume-ng-tests/pom.xml: Duplicated tag: 'build' (position: START_TAG seen ...</dependencies>\n\n  <build>... @86:10)  @ line 86, column 10 -> [Help 2]
        [ERROR] 
        [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
        [ERROR] Re-run Maven using the -X switch to enable full debug logging.
        [ERROR] 
        [ERROR] For more information about the errors and possible solutions, please read the following articles:
        [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
        [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException
        

        You should probably have only one <build> tag in flume-ng-tests/pom.xml (There is one at the end - you should just add the contents of this patch in that one.

        Show
        Hari Shreedharan added a comment - Aline Guedes Pinto - The patch causes the build to fail with: [INFO] Scanning for projects... [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project (/Users/hshreedharan/work/flume-latest/flume/flume-ng-tests/pom.xml) has 1 error [ERROR] Non-parseable POM /Users/hshreedharan/work/flume-latest/flume/flume-ng-tests/pom.xml: Duplicated tag: 'build' (position: START_TAG seen ...</dependencies>\n\n <build>... @86:10) @ line 86, column 10 -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch . [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http: //cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http: //cwiki.apache.org/confluence/display/MAVEN/ModelParseException You should probably have only one <build> tag in flume-ng-tests/pom.xml (There is one at the end - you should just add the contents of this patch in that one.
        Hide
        Aline Guedes Pinto added a comment -

        Patch to fix test case on 1.3.0 and 1.3.1.

        Show
        Aline Guedes Pinto added a comment - Patch to fix test case on 1.3.0 and 1.3.1.

          People

          • Assignee:
            Aline Guedes Pinto
            Reporter:
            Aline Guedes Pinto
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development