- Mastering Hadoop
- Sandeep Karanth
- 321字
- 2021-08-06 19:52:57
What you need for this book?
The following software suites are required to try out the examples in the book:
- Java Development Kit (JDK 1.7 or later): This is free software from Oracle that provides a JRE (Java Runtime Environment) and additional tools for developers. It can be downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html.
- The IDE for editing Java code: IntelliJ IDEA is the IDE that has been used to develop the examples. Any other IDE of your choice can also be used. The community edition of the IntelliJ IDE can be downloaded from https://www.jetbrains.com/idea/download/.
- Maven: Maven is a build tool that has been used to build the samples in the book. Maven can be used to automatically pull-build dependencies and specify configurations via XML files. The code samples in the chapters can be built into a
JAR
using two simple Maven commands:mvn compile mvn assembly:single
These commands compile the code into a
JAR
file. These commands create a consolidatedJAR
with the program along with all its dependencies. It is important to change themainClass
references in thepom
.
xml
to the driver class name when building the consolidatedJAR
file.Hadoop-related consolidated
JAR
files can be run using the command:hadoop jar <jar file> args
This command directly picks the driver program from the
mainClass
that was specified in thepom
.
xml
. Maven can be downloaded and installed from http://maven.apache.org/download.cgi. The Maven XML template file used to build the samples in this book is as follows:<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>MasteringHadoop</groupId> <artifactId>MasteringHadoop</artifactId> <version>1.0-SNAPSHOT</version> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.0</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <version>3.1</version> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <mainClass>MasteringHadoop.MasteringHadoopTest</mainClass> </manifest> </archive> </configuration> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <archive> <manifest> <mainClass>MasteringHadoop.MasteringHadoopTest</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </plugin> </plugins> <pluginManagement> <plugins> <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <versionRange>[2.1,)</versionRange> <goals> <goal>copy-dependencies</goal> </goals> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> </build> <dependencies> <!-- Specify dependencies in this section --> </dependencies> </project>
- Hadoop 2.2.0: Apache Hadoop is required to try out the examples in general. Appendix, Hadoop for Microsoft Windows, has the details on Hadoop's single-node installation on a Microsoft Windows machine. The steps are similar and easier for other operating systems such as Linux or Mac, and they can be found at http://hadoop.apache.org/docs/r2.2.0/hadoop-project-dist/hadoop-common/SingleNodeSetup.html
推薦閱讀
- Dreamweaver CS3+Flash CS3+Fireworks CS3創(chuàng)意網(wǎng)站構(gòu)建實(shí)例詳解
- Go Machine Learning Projects
- 工業(yè)機(jī)器人工程應(yīng)用虛擬仿真教程:MotoSim EG-VRC
- Photoshop CS3圖層、通道、蒙版深度剖析寶典
- 塊數(shù)據(jù)5.0:數(shù)據(jù)社會(huì)學(xué)的理論與方法
- 我也能做CTO之程序員職業(yè)規(guī)劃
- Nginx高性能Web服務(wù)器詳解
- R Machine Learning Projects
- Salesforce Advanced Administrator Certification Guide
- C++程序設(shè)計(jì)基礎(chǔ)(上)
- Introduction to R for Business Intelligence
- 強(qiáng)化學(xué)習(xí)
- 設(shè)計(jì)模式
- Serverless Design Patterns and Best Practices
- JSP通用范例開發(fā)金典