3. Validate Service Connectivity

Use following commands test connectivity between the gateway host and the Hadoop service, then test connectivity between an external client to the Hadoop service through the gateway.

[Tip]Tip

If the communication between the gateway host and an internal Hadoop service fails, telnet to the service port to verify that the gateway is able to access the cluster node. Use the hostname and ports you specified in the service definition.

  • To test WebHDFS by getting the home directory:

    • Access WebHDFS directly. Enter the following command on the gateway host:

      curl http://$webhdfs-host:50070/webhdfs/v1?op=GETHOMEDIRECTORY 
      {"Path":"/user/gopher"}
    • Enter the following command on an external client:

      curl https://$gateway-host:$gateway_port/$gateway_path/$cluster_name/webhdfs/v1?op=GETHOMEDIRECTORY 
      {"Path":"/user/gopher"}
  • To test WebHCat/Templeton by getting the version:

    • Enter the following command on the gateway host:

      curl http://$webhdfs-host:50070/templeton/v1/version 
      {"supportedVersions":["v1"],"version":"v1"}
    • Enter the following command on an external client:

      curl https://$gateway-host:$gateway_port/$gateway_path/$cluster_name/templeton/v1/version 
      {"supportedVersions":["v1"],"version":"v1"}
  • To test Oozie by getting the version:

    • Enter the following command on the gateway host:

      curl http://$oozie-host:11000/oozie/v1/admin/build-version 
      {"buildVersion":"4.0.0.2.1.1.0-302"} 
    • Enter the following command on an external client:

      curl https://$gateway-host:$gateway_port/$gateway_path/$cluster_name/oozie/v1/admin/build-version
      {"buildVersion":"4.0.0.2.1.1.0-302"}
  • To test HBase/Stargate by getting the version:

    • Enter the following command on the gateway host:

      curl http://$hbase-host:17000/version
      rest 0.0.2 JVM: Oracle Corporation 1.7.0_51-24.45-b08 OS: Linux 3.8.0-29-generic amd64 Server: jetty/6.1.26 Jersey: 1.8
    • Enter the following command on an external client:

      curl https://$gateway-host:$gateway_port/$gateway_path/$cluster_name/hbase/version
      rest 0.0.2 JVM: Oracle Corporation 1.7.0_51-24.45-b08 OS: Linux 3.8.0-29-generic amd64 Server: jetty/6.1.26 Jersey: 1.8

loading table of contents...