Hadoop opens Webhdfs service and testing

Source: Internet
Author: User
Tags http post fluentd

The WEBHDFS concept is based on HTTP operations such as GET, PUT, post, and delete. Operations like Open, Getfilestatus, and Liststatus use HTTP GET, others like creat, Mkdirs, RENAME, and setpermission are dependent on the HTTP put type. The append operation is based on the HTTP post type, however, delete is using HTTP delete.


In the process of configuring the open source log system Fluentd, FLUENTD is the use of Webhdfs and HDFs communication, configuration for a long time, and finally found that Hadoop 0.20.2 does not support webhdfs! So the version of Hadoop in this article is: hadoop-1.2.1



Configure the Webhdfs service, very simple, just one file :

<property><name>dfs.webhdfs.enabled</name><value>true</value></property> <property><name>dfs.support.append</name><value>true</value></property> <property><name>dfs.support.broken.append</name><value>true</value></property >

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/54/4D/wKioL1R-r0zT7PIcAAJKc6n56Kw085.jpg "title=" QQ picture 20141203143250.jpg "alt=" Wkiol1r-r0zt7picaajkc6n56kw085.jpg "/>



Then restart the Hadoop service:

Stop-all.sh then start-all.sh


Looking at the log files in the Namenode server, the following line indicates that Webhdfs was started:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/54/4F/wKiom1R-sy_BWnmcAAi9duDb3LM985.jpg "title=" QQ picture 20141203145110.jpg "alt=" Wkiom1r-sy_bwnmcaai9dudb3lm985.jpg "/>


Now let's test if the Web can communicate:

Curl-i ' Http://172.16.41.151:50070/webhdfs/v1/?op=LISTSTATUS '


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/54/4F/wKiom1R-s5WgMJ2QAAHU3JU2f-M697.jpg "title=" QQ picture 20141203145334.jpg "alt=" Wkiom1r-s5wgmj2qaahu3ju2f-m697.jpg "/>


The relevant Operations command can refer to the official documentation:

Http://hadoop.apache.org/docs/r1.0.4/webhdfs.html

This article is from the "Shine_forever blog" blog, make sure to keep this source http://shineforever.blog.51cto.com/1429204/1585942

Hadoop opens Webhdfs service and testing

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.