- 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.
推薦閱讀
- Splunk 7 Essentials(Third Edition)
- ETL with Azure Cookbook
- Spark編程基礎(Scala版)
- TestStand工業自動化測試管理(典藏版)
- Blockchain Quick Start Guide
- 大數據改變世界
- Learning Apache Cassandra(Second Edition)
- 快學Flash動畫百例
- OpenStack Cloud Computing Cookbook(Second Edition)
- 水晶石精粹:3ds max & ZBrush三維數字靜幀藝術
- 大數據時代
- 分數階系統分析與控制研究
- 格蠹匯編
- Mastering pfSense
- IBM? SmartCloud? Essentials