README 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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.4.0a or higher (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. Installing protoc requires gcc 4.1.x or higher.
  13. If the make step fails with (Valid until a fix is released for protobuf 2.4.0a)
  14. ./google/protobuf/descriptor.h:1152: error:
  15. `google::protobuf::internal::Mutex*google::protobuf::DescriptorPool::mutex_'
  16. is private
  17. Replace descriptor.cc with http://protobuf.googlecode.com/svn-history/r380/trunk/src/google/protobuf/descriptor.cc
  18. Quick Maven Tips
  19. ----------------
  20. clean workspace: mvn clean
  21. compile and test: mvn install
  22. skip tests: mvn install -DskipTests
  23. skip test execution but compile: mvn install -Dmaven.test.skip.exec=true
  24. clean and test: mvn clean install
  25. run selected test after compile: mvn test -Dtest=TestClassName (combined: mvn clean install -Dtest=TestClassName)
  26. create runnable binaries after install: mvn assembly:assembly -Pnative (combined: mvn clean install assembly:assembly -Pnative)
  27. Eclipse Projects
  28. ----------------
  29. http://maven.apache.org/guides/mini/guide-ide-eclipse.html
  30. 1. Generate .project and .classpath files in all maven modules
  31. mvn eclipse:eclipse
  32. CAUTION: If the project structure has changed from your previous workspace, clean up all .project and .classpath files recursively. Then run:
  33. mvn eclipse:eclipse
  34. 2. Import the projects in eclipse.
  35. 3. Set the environment variable M2_REPO to point to your .m2/repository location.
  36. NetBeans Projects
  37. -----------------
  38. NetBeans has builtin support of maven projects. Just "Open Project..."
  39. and everything is setup automatically. Verified with NetBeans 6.9.1.
  40. Custom Hadoop Dependencies
  41. --------------------------
  42. By default Hadoop dependencies are specified in the top-level pom.xml
  43. properties section. One can override them via -Dhadoop-common.version=...
  44. on the command line. ~/.m2/settings.xml can also be used to specify
  45. these properties in different profiles, which is useful for IDEs.
  46. Modules
  47. -------
  48. YARN consists of multiple modules. The modules are listed below as per the directory structure:
  49. hadoop-yarn-api - Yarn's cross platform external interface
  50. hadoop-yarn-common - Utilities which can be used by yarn clients and server
  51. hadoop-yarn-server - Implementation of the hadoop-yarn-api
  52. hadoop-yarn-server-common - APIs shared between resourcemanager and nodemanager
  53. hadoop-yarn-server-nodemanager (TaskTracker replacement)
  54. hadoop-yarn-server-resourcemanager (JobTracker replacement)
  55. Utilities for understanding the code
  56. ------------------------------------
  57. Almost all of the yarn components as well as the mapreduce framework use
  58. state-machines for all the data objects. To understand those central pieces of
  59. the code, a visual representation of the state-machines helps much. You can first
  60. convert the state-machines into graphviz(.gv) format by
  61. running:
  62. mvn compile -Pvisualize
  63. Then you can use the dot program for generating directed graphs and convert the above
  64. .gv files to images. The graphviz package has the needed dot program and related
  65. utilites.For e.g., to generate png files you can run:
  66. dot -Tpng NodeManager.gv > NodeManager.png