[
https://issues.apache.org/jira/browse/FLUME-1920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14066141#comment-14066141
]
li xiang commented on FLUME-1920:
---------------------------------
Hi Mike, sorry for my late response.
1. I failed to run this test case only:
flume\flume-ng-tests\src\test\java\org\apache\flume\test\agent\TestFileChannel.java.
Firstly I tried to modify the pom.xml to add "<include>
**/TestFileChannel.java</include>" but other TestFileChannel.java in
flume-ng-channel\flume-file-channel is tested, not the one in flume-ng-tests as
expected.
Also tried with "mvn test -Dtest=org.apache.flume.test.agent.TestFileChannel
-DfailIfNoTests=false", to specify the package name, but no test is performed.
How can I run this test case solo ?
2. What do you mean by "removing the hadoop jar from this test" ?
Remove the file hadoop.xxx.jar or remove haoop-jar related code ? The code in
StagedInstall.java is to add "--classpath xxxx" when starting flume, xxxx is a
directory in java class path which has hadoop jar. I can not understand the
logic here, why a path containing hadoop jar is needed for flume to start.
Really appreciate if you have any comments
> Test case TestFileChannel fails when flume is built from paths containing the
> string "hadoop"
> ---------------------------------------------------------------------------------------------
>
> Key: FLUME-1920
> URL: https://issues.apache.org/jira/browse/FLUME-1920
> Project: Flume
> Issue Type: Improvement
> Components: Test
> Affects Versions: v1.3.0, v1.4.0, v1.3.1, v1.5.0, v1.6.0
> Reporter: Aline Guedes Pinto
> Assignee: Aline Guedes Pinto
> Priority: Minor
> Attachments: FLUME-1920-1.patch, FLUME-1920.patch
>
>
> 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".
--
This message was sent by Atlassian JIRA
(v6.2#6252)