Using the HCatalog REST API (WebHCat)
Table of Contents |
---|
Info | ||
---|---|---|
| ||
The HCatalog project graduated from the Apache incubator and merged with the Hive project on March 26, 2013. |
...
This document describes the HCatalog REST API, WebHCat, which was previously called Templeton. If you are looking for a Hive GUI instead of an API, see Hive Web Interface (removed in release 2.2.0).
As shown in the figure below, developers make HTTP requests to access Hadoop MapReduce (or YARN), Pig, Hive, and HCatalog DDL from within applications. Data and code used by this API are maintained in HDFS. HCatalog DDL commands are executed directly when requested. MapReduce, Pig, and Hive jobs are placed in queue by WebHCat (Templeton) servers and can be monitored for progress or stopped as required. Developers specify a location in HDFS into which Pig, Hive, and MapReduce results should be placed.
...
For example, to specify user.name in a GET :table command:
No Format |
---|
% 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:
No Format |
---|
% curl -s -d user.name=ctdean \
-d rename=test_table_2 \
'http://localhost:50111/templeton/v1/ddl/database/default/table/test_table'
|
...
If the user.name parameter is not supplied when required, the following error will be returned:
No Format |
---|
{
"error": "No user found. Missing user.name parameter."
}
|
...
Hive log files are described in the Error Logs Hive Logging section of Getting Started.
...
The original work to add REST APIs to HCatalog was called Templeton. For backward compatibility the name still appears in URLs, log file names, etc. The Templeton name is taken from a character in the award-winning children's novel Charlotte's Web, by E. B. White. The novel's protagonist is a pig named Wilbur. Templeton is a rat who helps Wilbur by running errands and making deliveries as requested by Charlotte while spinning her web.
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
Next: WebHCat Installation General: WebHCat Manual – HCatalog Manual – Hive Wiki Home – Hive Project Site |