What Is Apache HCatalog?
Getting ready to dive into HCatalog? This overview of the ever-useful HCatalog storage management layer for Hadoop briefs you on what it does and how it works.
Join the DZone community and get the full member experience.Join For Free
What is HCatalog?
Apache HCatalog is a Storage Management Layer for Hadoop that helps users of different data processing tools in the Hadoop ecosystem—like Hive, Pig and MapReduce—to easily read and write data from the cluster. HCatalog enables a relational view of data from RCFile format, Parquet, ORC files, or Sequence files stored on HDFS. It also exposes a REST API to external systems to access metadata.
Apache HCatalog provides the following benefits:
- Frees the user from having to know where the data is stored (with the table abstraction)
- Enables notifications of data availability
- Provides visibility for data cleaning and archiving tools
How It Works?
HCatalog supports reading and writing files in any format for which a Hive SerDe (serializer-deserializer) can be written. By default, HCatalog supports RCFile, Parquet, ORCFile CSV, JSON, and SequenceFile formats. To use a custom format, you must provide the InputFormat, OutputFormat, and SerDe.
HCatalog is built on top of the Hive metastore and incorporates components from the Hive DDL. HCatalog provides read and write interfaces for Pig and MapReduce and uses Hive’s command line interface for issuing data definition and metadata exploration commands. It also presents a REST interface to allow external tools access to Hive DDL (Data Definition Language) operations, such as “create table” and “describe table.”
HCatalog presents a relational view of data. Data is stored in tables and these tables can be placed into databases. Tables can also be partitioned on one or more keys. For a given value of a key (or set of keys) there will be one partition that contains all rows with that value (or set of values).
To see, how HCatalog can be used with Pig visit here.
Published at DZone with permission of Saurabh Chhajed, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.