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