Build a Hadoop development environment in Ubuntu

Source: Internet
Author: User
Practice environment: Ubuntu machine name ip & nbsp

Practical environment: Ubuntu
Machine name ip Address used for machine configuration
Main Process
1. Modify hosts
Cat/etc/hosts
Modify both the master and slave, and add the machine name and corresponding ip address.
2. log on to the local machine and other machines without a password through ssh
3. JDK environment http://www.linuxidc.com/Linux/2012-06/61614.htm
4. Install Hadoop
5. Configure hadoop
6. Run hadoop
Start the./start-all.sh on the master
View through jps,
13136 SecondaryNameNode
13227 JobTracker
Jps 13530
On slave, jps
6654 TaskTracker
Jps 6707
6463 DataNode
The namenode cannot be seen on the jps on the master node. If there is a problem, view the namenode logs under logs, as shown below:

22:04:31, 872 INFO org. apache. hadoop. hdfs. server. namenode. NameNode: STARTUP_MSG:
/*************************************** *********************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = guxu-Lenovo-B460/127.0.1.1
STARTUP_MSG: args = []
STARTUP_MSG: version = 1.0.3
STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.0-r 1335192; compiled by 'hortonfo' on Tue May 8 20:31:25 UTC 2012
**************************************** ********************/
2012-05-31 22:04:32, 034 INFO org. apache. hadoop. metrics2.impl. MetricsConfig: loaded properties from hadoop-metrics2.properties
2012-05-31 22:04:32, 046 INFO org. apache. hadoop. metrics2.impl. MetricsSourceAdapter: MBean for source MetricsSystem, sub = Stats registered.
22:04:32, 048 INFO org. apache. hadoop. metrics2.impl. MetricsSystemImpl: Scheduled snapshot period at 10 second (s ).
2012-05-31 22:04:32, 048 INFO org. apache. hadoop. metrics2.impl. MetricsSystemImpl: NameNode metrics system started
2012-05-31 22:04:32, 237 INFO org. apache. hadoop. metrics2.impl. MetricsSourceAdapter: MBean for source ugi registered.
2012-05-31 22:04:32, 242 WARN org. apache. hadoop. metrics2.impl. MetricsSystemImpl: Source name ugi already exists!
22:04:32, 258 INFO org. apache. hadoop. metrics2.impl. MetricsSourceAdapter: MBean for source jvm registered.
22:04:32, 259 INFO org. apache. hadoop. metrics2.impl. MetricsSourceAdapter: MBean for source NameNode registered.
22:04:32, 298 INFO org. apache. hadoop. hdfs. util. GSet: VM type = 32-bit
22:04:32, 298 INFO org. apache. hadoop. hdfs. util. GSet: 2% max memory = 17.77875 MB
22:04:32, 298 INFO org. apache. hadoop. hdfs. util. GSet: capacity = 2 ^ 22 = 4194304 entries
22:04:32, 298 INFO org. apache. hadoop. hdfs. util. GSet: recommended = 4194304, actual = 4194304
22:04:32, 335 INFO org. apache. hadoop. hdfs. server. namenode. FSNamesystem: fsOwner = guxu
22:04:32, 335 INFO org. apache. hadoop. hdfs. server. namenode. FSNamesystem: supergroup = supergroup
22:04:32, 335 INFO org. apache. hadoop. hdfs. server. namenode. FSNamesystem: isPermissionEnabled = true
22:04:32, 342 INFO org. apache. hadoop. hdfs. server. namenode. FSNamesystem: dfs. block. invalidate. limit = 100
22:04:32, 342 INFO org. apache. hadoop. hdfs. server. namenode. FSNamesystem: isAccessTokenEnabled = false accessKeyUpdateInterval = 0 min (s), accessTokenLifetime = 0 min (s)
22:04:32, 674 INFO org. apache. hadoop. hdfs. server. namenode. FSNamesystem: Registered FSNamesystemStateMBean and NameNodeMXBean
22:04:32, 695 INFO org. apache. hadoop. hdfs. server. namenode. NameNode: Caching file names occuring more than 10 times
22:04:32, 700 INFO org. apache. hadoop. hdfs. server. common. Storage: Storage directory/home/guxu/hadoop_tmp_dir/dfs/name does not exist.
22:04:32, 702 ERROROrg. apache. hadoop. hdfs. server. namenode. FSNamesystem: FSNamesystem initialization failed.
Org. apache. hadoop. hdfs. server. common. InconsistentFSStateException: Directory/home/guxu/hadoop_tmp_dir/dfs/name is in an inconsistent state: storage directory does not exist or is not accessible.
At org. apache. hadoop. hdfs. server. namenode. FSImage. recoverTransitionRead (FSImage. java: 303)
At org. apache. hadoop. hdfs. server. namenode. FSDirectory. loadFSImage (FSDirectory. java: 100)
At org. apache. hadoop. hdfs. server. namenode. FSNamesystem. initialize (FSNamesystem. java: 388)
At org. apache. hadoop. hdfs. server. namenode. FSNamesystem. (FSNamesystem. java: 362)
At org. apache. hadoop. hdfs. server. namenode. NameNode. initialize (NameNode. java: 276)
At org. apache. hadoop. hdfs. server. namenode. NameNode. (Nameenode. java: 496)
At org. apache. hadoop. hdfs. server. namenode. NameNode. createNameNode (NameNode. java: 1279)
At org. apache. hadoop. hdfs. server. namenode. NameNode. main (NameNode. java: 1288)
22:04:32, 704 ERROR org. apache. hadoop. hdfs. server. namenode. nameNode: org. apache. hadoop. hdfs. server. common. inconsistentFSStateException: Directory/home/guxu/hadoop_tmp_dir/dfs/name is in an inconsistent state: storage directory does not exist or is not accessible.
At org. apache. hadoop. hdfs. server. namenode. FSImage. recoverTransitionRead (FSImage. java: 303)
At org. apache. hadoop. hdfs. server. namenode. FSDirectory. loadFSImage (FSDirectory. java: 100)
At org. apache. hadoop. hdfs. server. namenode. FSNamesystem. initialize (FSNamesystem. java: 388)
At org. apache. hadoop. hdfs. server. namenode. FSNamesystem. (FSNamesystem. java: 362)
At org. apache. hadoop. hdfs. server. namenode. NameNode. initialize (NameNode. java: 276)
At org. apache. hadoop. hdfs. server. namenode. NameNode. (Nameenode. java: 496)
At org. apache. hadoop. hdfs. server. namenode. NameNode. createNameNode (NameNode. java: 1279)
At org. apache. hadoop. hdfs. server. namenode. NameNode. main (NameNode. java: 1288)

22:04:32, 705 INFO org. apache. hadoop. hdfs. server. namenode. NameNode: SHUTDOWN_MSG:
/*************************************** *********************
SHUTDOWN_MSG: Shutting down NameNode at guxu-Lenovo-B460/127.0.1.1
**************************************** ********************/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.