- Hadoop MapReduce v2 Cookbook(Second Edition)
- Thilina Gunarathne
- 275字
- 2021-07-23 20:32:52
Setting up Hadoop v2 on your local machine
This recipe describes how to set up Hadoop v2 on your local machine using the local mode. Local mode is a non-distributed mode that can be used for testing and debugging your Hadoop applications. When running a Hadoop application in local mode, all the required Hadoop components and your applications execute inside a single Java Virtual Machine (JVM) process.
Getting ready
Download and install JDK 1.6 or a higher version, preferably the Oracle JDK 1.7. Oracle JDK can be downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html.
How to do it...
Now let's start the Hadoop v2 installation:
- Download the most recent Hadoop v2 branch distribution (Hadoop 2.2.0 or later) from http://hadoop.apache.org/releases.html.
- Unzip the Hadoop distribution using the following command. You will have to change the
x.x.
in the filename to the actual release you have downloaded. From this point onward, we will call the unpacked Hadoop directory{HADOOP_HOME}
:$ tar -zxvf hadoop-2.x.x.tar.gz
- Now, you can run Hadoop jobs through the
{HADOOP_HOME}/bin/hadoop
command, and we will elaborate on that further in the next recipe.
How it works...
Hadoop local mode does not start any servers but does all the work within a single JVM. When you submit a job to Hadoop in local mode, Hadoop starts a JVM to execute the job. The output and the behavior of the job is the same as a distributed Hadoop job, except for the fact that the job only uses the current node to run the tasks and the local filesystem is used for the data storage. In the next recipe, we will discover how to run a MapReduce program using the Hadoop local mode.
- Node.js Design Patterns
- Mobile Application Development:JavaScript Frameworks
- Python入門(mén)很簡(jiǎn)單
- Raspberry Pi for Secret Agents(Third Edition)
- 人人都是網(wǎng)站分析師:從分析師的視角理解網(wǎng)站和解讀數(shù)據(jù)
- Mastering KnockoutJS
- Rust Essentials(Second Edition)
- Python完全自學(xué)教程
- JavaCAPS基礎(chǔ)、應(yīng)用與案例
- Go語(yǔ)言精進(jìn)之路:從新手到高手的編程思想、方法和技巧(1)
- Kotlin開(kāi)發(fā)教程(全2冊(cè))
- IoT Projects with Bluetooth Low Energy
- Magento 2 Beginners Guide
- Android技術(shù)內(nèi)幕(系統(tǒng)卷)
- CISSP in 21 Days(Second Edition)