README 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. YARN (YET ANOTHER RESOURCE NEGOTIATOR or YARN Application Resource Negotiator)
  2. ------------------------------------------------------------------------------
  3. Requirements
  4. -------------
  5. Java: JDK 1.6
  6. Maven: Maven 3
  7. Setup
  8. -----
  9. Install protobuf 2.5.0 (Download from http://code.google.com/p/protobuf/downloads/list)
  10. - install the protoc executable (configure, make, make install)
  11. - install the maven artifact (cd java; mvn install)
  12. Quick Maven Tips
  13. ----------------
  14. clean workspace: mvn clean
  15. compile and test: mvn install
  16. skip tests: mvn install -DskipTests
  17. skip test execution but compile: mvn install -Dmaven.test.skip.exec=true
  18. clean and test: mvn clean install
  19. run selected test after compile: mvn test -Dtest=TestClassName (combined: mvn clean install -Dtest=TestClassName)
  20. create runnable binaries after install: mvn assembly:assembly -Pnative (combined: mvn clean install assembly:assembly -Pnative)
  21. Eclipse Projects
  22. ----------------
  23. http://maven.apache.org/guides/mini/guide-ide-eclipse.html
  24. 1. Generate .project and .classpath files in all maven modules
  25. mvn eclipse:eclipse
  26. CAUTION: If the project structure has changed from your previous workspace, clean up all .project and .classpath files recursively. Then run:
  27. mvn eclipse:eclipse
  28. 2. Import the projects in eclipse.
  29. 3. Set the environment variable M2_REPO to point to your .m2/repository location.
  30. NetBeans Projects
  31. -----------------
  32. NetBeans has builtin support of maven projects. Just "Open Project..."
  33. and everything is setup automatically. Verified with NetBeans 6.9.1.
  34. Custom Hadoop Dependencies
  35. --------------------------
  36. By default Hadoop dependencies are specified in the top-level pom.xml
  37. properties section. One can override them via -Dhadoop-common.version=...
  38. on the command line. ~/.m2/settings.xml can also be used to specify
  39. these properties in different profiles, which is useful for IDEs.
  40. Modules
  41. -------
  42. YARN consists of multiple modules. The modules are listed below as per the directory structure:
  43. hadoop-yarn-api - YARN's cross platform external interface
  44. hadoop-yarn-common - Utilities which can be used by yarn clients and server
  45. hadoop-yarn-server - Implementation of the hadoop-yarn-api
  46. hadoop-yarn-server-common - APIs shared between resourcemanager and nodemanager
  47. hadoop-yarn-server-nodemanager (TaskTracker replacement)
  48. hadoop-yarn-server-resourcemanager (JobTracker replacement)
  49. Utilities for understanding the code
  50. ------------------------------------
  51. Almost all of the yarn components as well as the mapreduce framework use
  52. state-machines for all the data objects. To understand those central pieces of
  53. the code, a visual representation of the state-machines helps much. You can first
  54. convert the state-machines into graphviz(.gv) format by
  55. running:
  56. mvn compile -Pvisualize
  57. Then you can use the dot program for generating directed graphs and convert the above
  58. .gv files to images. The graphviz package has the needed dot program and related
  59. utilites.For e.g., to generate png files you can run:
  60. dot -Tpng NodeManager.gv > NodeManager.png