- Hadoop Beginner's Guide
- Garry Turkington
- 152字
- 2021-07-29 16:51:39
Time for action – building a JAR file
Before we run our job in Hadoop, we must collect the required class files into a single JAR file that we will submit to the system.
Create a JAR file from the generated class files.
$ jar cvf wc1.jar WordCount1*class
What just happened?
We must always package our class files into a JAR file before submitting to Hadoop, be it local or on Elastic MapReduce.
Tip
Be careful with the JAR command and file paths. If you include in a JAR file class the files from a subdirectory, the class may not be stored with the path you expect. This is especially common when using a catch-all classes directory where all source data gets compiled. It may be useful to write a script to change into the directory, convert the required files into JAR files, and move the JAR files to the required location.
推薦閱讀
- Dreamweaver CS3 Ajax網頁設計入門與實例詳解
- 數據展現的藝術
- SCRATCH與機器人
- Mastering VMware vSphere 6.5
- Dreamweaver 8中文版商業案例精粹
- 輕松學Java
- 網絡安全技術及應用
- Salesforce Advanced Administrator Certification Guide
- Machine Learning Algorithms(Second Edition)
- MATLAB-Simulink系統仿真超級學習手冊
- Mastering Ansible(Second Edition)
- 51單片機應用程序開發與實踐
- 從機器學習到無人駕駛
- Practical Network Automation
- Oracle 11g基礎與提高