0

After about 4 tries I've managed to use git to checkout apache's Hadoop source code, issue a

mvn eclipse:eclipse

command and then import all of the projects into eclipse. So far this has been the most successful I have been. I am ALMOST there. I attempted to build and clean all projects and everything was going well. Now I only have 3 errors to get rid of. I would be EXTREMELY appreciate if anyone could help me with this. I have been trying to get this to work for about 2 days or so. Anyway, in Eclipse I have about 20 Hadoop projects. There are only two that have errors. One is called "hadoop-streaming" and the other is "hadoop-tools-dist."

The error says the following:

Project 'hadoop-streaming' is missing required source folder: 'C:/Users/User/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/conf'

The other errors are mainly related to this one. That's what Eclipse says anyway. I tried to copy the folder to where it was needed but that didn't clear up the error. Does anyone know how to fix this? If you need anything from me just ask.

Tastybrownies
  • 897
  • 3
  • 23
  • 49

2 Answers2

1

I don't know how the Hadoop project looks like, but I suppose that it is using maven. So instead of using the

mvn eclipse:eclipse

I would suggest using the import functionality of eclipse -> import maven projects (even though sometimes works harder than one might expect). Related to your issue, this kind of error occurred to me whenever there was some kind of folder that is not added as source folder in eclipse (generated folders for source etc.). So, I would advise checking that the folder you mentioned is already there and if it is added as a source folder. If not, just mark it accordingly (source folder). Clean the project (Project > Clean...) and if need update the maven project(Right click on the parent project > Maven > Update project ...)

Good luck!

Olimpiu POP
  • 5,001
  • 4
  • 34
  • 49
  • Hey, thanks for responding. So, I re-checked out a fresh hadoop, and issued a mvn install -DskipTests. It said BUILD SUCCESS. Then I went to eclipse and tried to import through maven existing projects. It brought all the files in and then I hit next to move to Setup Mavin plugin connectors. All is green except a red error that says, "hadoop-maven-plugins:3.0.0-SNAPSHOT:version-info" it says it is in hadoop-common/pom.xml and hadoop-yard-commmon/pom.xml. Do you have any idea what this is or how to fix it? – Tastybrownies Feb 11 '13 at 20:54
  • doesn't ring a bell, though I search a little bit and found this: [known_issue](https://issues.apache.org/jira/browse/HADOOP-9235) from hadoop. I hope it helps you. – Olimpiu POP Feb 11 '13 at 21:47
  • No, I have not fixed this. If I import existing maven project I get the error I spoke about above. If I issue mvn eclipse:eclipse and import the project most files are okay. There are 3 small errors however (2 of them relate to 1). It says hadoop-streaming is missing required source folder: and then it gives a path. I looked in the path and added it to streaming, didn't work. I have no idea how to get this to work. It's sad because it seems like there are no a lot of people that can help. – Tastybrownies Feb 12 '13 at 15:19
  • In the previous comment, I posted a link to a issue on hadoop, the description sounded quite similar to the what you described. It had a patch also attached. Did you try that? – Olimpiu POP Feb 12 '13 at 20:35
  • Yes, I did try that. The patch didn't apply, there were hunk errors. – Tastybrownies Feb 14 '13 at 05:12
1

In eclipse:

  1. right click on the hadoop-streaming program
  2. select Properties
  3. On the left side of the bar,click Java Build Path button,then select source lable page
  4. delete the path that went wrong
  5. click Link Source
  6. select the linked directory as (your hadoop-src root path)/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/conf
  7. click Next button, inclusion patterns add capacity-scheduler.xml,exclusion patters add **/*.java
INIT
  • 11
  • 2