- 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.
推薦閱讀
- Unreal Engine:Game Development from A to Z
- R Machine Learning By Example
- 物聯(lián)網(wǎng)與云計(jì)算
- ROS機(jī)器人編程與SLAM算法解析指南
- Google App Inventor
- RPA(機(jī)器人流程自動(dòng)化)快速入門(mén):基于Blue Prism
- 觸控顯示技術(shù)
- 電腦上網(wǎng)輕松入門(mén)
- 所羅門(mén)的密碼
- 在實(shí)戰(zhàn)中成長(zhǎng):C++開(kāi)發(fā)之路
- 中文版AutoCAD 2013高手速成
- Microsoft Dynamics CRM 2013 Marketing Automation
- 貫通Java Web輕量級(jí)應(yīng)用開(kāi)發(fā)
- Flash CS3動(dòng)畫(huà)制作融會(huì)貫通
- Mastering Microsoft Dynamics 365 Customer Engagement