HCatalog was built as an interface to allow tools such as Pig and MapReduce
to access Hive tabular data, for both read and write.  In more recent
versions of Hive, HCatalog has not been updated to support the newest
features, such as reading or writing transactional data or, in Hive 3.x,
accessing managed tables (that tables that Hive owns).

HiveServer2 is a ODBC/JDBC server for Hive.  There no relationship between
HiveServer2 and HCatalog.

Hive also has a metastore, a data catalog that tracks metadata for Hive
tables.  This can be run as a separate service, in which case it is often
referred to as HMS, or embedded into another system.  For example in the
past HiveServer2 was often configured to embed the metastore
functionality.  HCatalog communicates with the metastore to determine what
physical storage objects (files or objects in an object store) make up a
table or partition that the non-Hive user wants to interact with.
Traditionally Spark communicates directly with the Hive metastore (I
believe it can either embed the metastore functionality or communicate with
an external HMS, but I'm not sure) and then operates directly on the
underlying files or objects. This no longer works in Hive 3, and there are
other ways to connect the two, which I can go into if you're interested.

Alan.


On Fri, May 24, 2019 at 1:28 AM 崔苗(未来技术实验室) <0049003...@znv.com> wrote:

> Hi,
> we have some confusion about hive :
> 1、what is the difference between hcatalog and hiveserver2 ,does
> hiveserver2 rely on hcatalog ?
> 2、what is the layer of hcatalog and hiverserver2 in the whole  Hive
> Architecture ?
> 3、how does spark sql read hive tables , through hcatalog or hiveserver2 ?
>
> thanks for any replys
>
> 0049003208
> 0049003...@znv.com
>
> <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=0049003208&uid=0049003208%40znv.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyelogo%2FdefaultAvatar.png&items=%5B%220049003208%40znv.com%22%5D>
> 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail81> 定制
>

Reply via email to