【问题标题】:What is the difference between the hive metastore in derby vs the one in hive/warehouse?derby 中的 Hive Metastore 与 Hive/Warehouse 中的 Hive Metastore 有什么区别?
【发布时间】:2016-02-18 08:38:29
【问题描述】:

这可能是一个非常基本的问题,所以请原谅我的无知。

我了解 hive 将在开箱即用(hive tar.bin 提取)香草设置中使用两个元存储。就我而言,我有蜂巢 0.14。

在 derby 数据库中有一个 - 在 hdfs 之外有一个名为 metastore_db 的默认文件夹名称。

在 /user/hive/warehouse 的 hdfs 中还有另一个。

这两者有什么区别?

【问题讨论】:

    标签: hadoop hive bigdata


    【解决方案1】:

    在 Hive 中,Metastore 由 (1) 元存储服务和 (2) 数据库组成。

    Metastore DB - 是任何适用于 JDBC 的 RDBMS 数据库,其中存储 managed and external tables 的架构和分区详细信息。其他应用程序(例如 Impala)可以使用它来从中获取表和架构详细信息。顾名思义,它只存储元数据。

    Metastore 服务 - Hive 还运行称为 Metastore 服务的单独服务来管理 Metastore 数据,将 Hive 表和分区的元数据存储在 Metastore 数据库中,并提供客户端(包括 Hive)访问通过 Metastore 服务 API 获取此信息。

    Warehouse - Hive 数据存储在 HDFS 中,通常在 /user/hive/warehouse 下(或您在 hive-site.xml 中指定为 hive.metastore.warehouse.dir 的任何路径)。

    【讨论】:

      【解决方案2】:

      元存储是hive存储表的schema的地方,更多的数据是如何引用仓库中schema表的数据的目录。

      Warehouse 通常存储在 HDFS 中,Metastore 存储在 Derby、MySQL 或 Postgre 等关系数据库中。

      Metastore 通常用于许多其他应用程序,例如 impala 用于发现仓库中的表。

      【讨论】:

        猜你喜欢
        • 2016-05-15
        • 2014-11-21
        • 2018-09-23
        • 2014-08-27
        • 2021-04-30
        • 2017-04-29
        • 2014-02-22
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多