Hadoop testing (1)-complete HDFS file operation test code

Source: Internet
Author: User

Recently, I am looking for an overall storage and analysis solution. We need to consider massive storage, analysis, and scalability. When I got to hadoop, I just started to position it to HDFS for storage. The more I see it, the more I get excited.

First, perform the HDFS operation test.CodeThe complete eclipse + Tomcat project uses the Tomcat plug-in and hadoop 0.20.0 for massive file manager for convenient management;

Set up three portals:

Tomcat root path HFS. For more information, see Web. xml.

    • /Used for file system browsing
    • /Upload. jsp is used to upload files
    • /PIC. Do for File Viewing

Note the following configurations: In the hardcode: fs. hdfsconfig, specify the default directory;

Inside the core-site.xml, configure the address and protocol for HDFS:
<Property>
<Name> fs. Default. Name </Name>
<Value> HDFS :/// namenode: 9000 </value>
</Property>

In the mapred-site.xml, configure the user name and password:
<Property>
<Name> hadoop. Job. ugi </Name>
<Value> root, 123456 </value>
<Description> hadoop user access password </description>
</Property>

Specify the namenode of the hosts file on your machine to 122.224.142.155, And you can test it on Monday ~ Effective on Friday, port ing

ReferenceArticleHttp://myjavanotebook.blogspot.com/2008/05/hadoop-file-system-tutorial.html

References http://hadoop.apache.org/

Eclipse Development Environment configuration http://blog.csdn.net/yanical/archive/2009/08/23/4474991.aspx

The installation of the hadoop test environment is not introduced, but the test environment for simple development is relatively simple. We recommend that you use two virtual machines, source code.

At the beginning of contact, a lot of exchanges, welcome to microblogging exchange, http://weibo.com/itrs

I thought that map/reduce was taken out of the nginx Log Analysis Department, but all the code was gone. I haven't been tossing Java, JS, and Linux for a long time. I pasted them on Google; A hard disk strikes and the development environment is gone. After one night, eclipse and tomcat are finally built.

The general structure is as follows:

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.