2. Using WebHCat

WebHCat provides a REST API for HCatalog and related Hadoop components.

[Note]Note

WebHCat was originally named Templeton, and both terms may still be used interchangeably. For backward compatibility the Templeton name still appears in URLs, log file names, etc.

For details about WebHCat (Templeton), see the following resources:

 2.1. Technical Update: WebHCat Standard Parameters

The "Security" section of the WebHCat Overview should be updated with information in the Note below:

 2.1.1. Security

The current version supports two types of security:

  • Default security (without additional authentication)

  • Authentication via Kerberos

 2.1.1.1. Standard Parameters

Every REST resource can accept the following parameters to aid in authentication:

  • user.name: The user name as a string. Only valid when using default security.

  • SPNEGO credentials: When running with Kerberos authentication.

[Note]Note

The user.name parameter is part of POST parameters for POST calls, and part of the URL for other calls.

For example, to specify user.name in a GET :table command:

% curl -s 'http://localhost:50111/templeton/v1/ddl/database/default/table/my_table?user.name=ctdean'
                    

And to specify user.name in a POST :table command:

% curl -s -d user.name=ctdean \
       -d rename=test_table_2 \
       'http://localhost:50111/templeton/v1/ddl/database/default/table/test_table'
                    
 2.1.1.2. Security Error Response

If the user.name parameter is not supplied when required, the following error will be returned:

{
  "error": "No user found.  Missing user.name parameter."
}
                

loading table of contents...