In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article focuses on "how to configure Hadoop stand-alone mode and run Wordcount", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to configure Hadoop stand-alone mode and run Wordcount.
two。 Install rsync
Rsync is installed by default in our Ubuntu version 12.10, and we can install or update rsync with the following command
3. Install hadoop, and Jialin saves the latest stable version of hadoop downloaded in the following location on your computer:
Create the / usr/local/hadoop directory and extract the downloaded Hadoop into / usr/local/hadoop:
4. Configure Java installation information in hadoop-env.sh.
Enter / usr/local/Hadoop/Hadoop-1.2.1/conf
Open hadoop-env.sh:
Press enter to enter the profile:
When we installed Java at "/ usr/lib/java/jdk1.7.0_60" when we installed Java earlier, we added the following configuration information to the hadoop-env.sh configuration file
Save and exit.
Use the source command to make the hadoop-env.sh configuration information effective:
At this time, the stand-alone mode of Hadoop is configured successfully!
In order to facilitate us to use the relevant commands in the bin directory of Hadoop immediately after boot, you can configure the bin directory to the "~ / .bashrc" file. At this time, the system automatically reads the contents of the "~ / .bashrc" file after startup, and I can use the Hadoop command at any time:
The contents of the modified file:
Save exit and use the following command to make the configuration effective:
5. To verify the version information of Hadoop, use the "hadoop version" command:
6. Run the WordCount example that comes with Hadoop:
First, create an input directory under the hadoop directory and copy all the files under conf to this directory. You need the following command:
Use the hadoop command to run your own wordcount program and output the results to output:
The running process is as follows:
Keep running until it is complete (because the running process is a bit long, some of the running process is omitted, and only the beginning and end are intercepted):
View the running results:
After the command is executed, the word count results in several files in Wordcount running input are displayed, as shown below (some of them are intercepted directly):
The construction, configuration and running testing of stand-alone mode are completely successful!
At this point, I believe you have a deeper understanding of "how to configure Hadoop stand-alone mode and run Wordcount". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 295
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.