concept WebHDFS in category hadoop

This is an excerpt from Manning's book Hadoop in Practice, Second Edition.
5 In fact, a new C client was written in Hadoop 2 called libwebhdfs to leverage WebHDFS. See https://issues.apache.org/jira/browse/HDFS-2656.
Table 5.1. WebHDFS libraries
Language
Link
C libwebhdfs (bundled with Hadoop) Python https://github.com/drelu/webhdfs-py Ruby https://github.com/kzk/webhdfs https://rubygems.org/gems/webhdfs Perl http://search.cpan.org/~afaris/Apache-Hadoop-WebHDFS-0.04/lib/Apache/Hadoop/WebHDFS.pm WebHDFS is useful when the client has access to all the NameNodes and DataNodes. In locked-down environments, this may not be the case, and you may need to look at HttpFS.
With HFTP(S), you’ll have to run the DistCp command on the destination cluster so that HDFS writes using the same Hadoop client version as the destination. But what if this is too constrained for your environment—what if you have a firewall that doesn’t allow you to run DistCp on the destination? That’s where WebHDFS comes into play.
WebHDFS has the advantage over HFTP of providing both a read and write interface. You can use it for either the source or destination in your DistCp, as shown here:
$ hadoop distcp hdfs://nn1:50070/source webhdfs://nn2:50070/destWebHDFS has an additional benefit in the form of data locality—it uses HTTP redirection when reading and writing data so that reads and writes are performed with the actual DataNode that stores the data. It’s highly recommended that you use WebHDFS rather than HFTP for both its writing abilities and the performance improvements.