Dataproc Metastore 概览

Dataproc Metastore 是在 Google Cloud 上运行的全代管式 Apache Hive Metastore (HMS)。HMS (HMS) 是开源大数据生态系统中用于管理技术元数据(例如关系型数据库中的架构、分区和列统计信息)的既定标准。

Dataproc Metastore 具有高可用性、自动修复功能和无服务器功能。该服务可用于管理数据湖元数据,并在您使用的各种数据处理引擎和工具之间提供互操作性。

Dataproc Metastore 的工作原理

您可以通过将 Dataproc Metastore 服务连接到 Dataproc 集群来使用该服务。Dataproc 集群包含依赖 HMS 来驱动查询规划和执行的组件。

通过此集成,您可以保留作业之间的表信息,或使元数据可供其他集群和其他处理引擎使用。

例如,实现 Metastore 可能有助于指定文件子集包含收入数据,而不是手动跟踪文件名。在这种情况下,您可以为这些文件定义一个表,并将元数据存储在 Dataproc Metastore 中。之后,您可以将其连接到 Dataproc 集群,并使用 Hive、Spark SQL 或其他查询服务查询该表以获取信息。

Dataproc Metastore 版本

创建 Dataproc Metastore 服务时,您可以选择使用 Dataproc Metastore 2 服务Dataproc Metastore 1 服务

  • Dataproc Metastore 2 是新一代服务,除了 Dataproc Metastore 1 功能之外,还提供横向可伸缩性。如需了解详情,请参阅功能和优势

  • Dataproc Metastore 2 的定价方案与 Dataproc Metastore 不同。如需了解详情,请参阅定价方案和伸缩配置

常见使用场景

除非另有说明,否则 Dataproc Metastore 2 和 Dataproc Metastore 1 支持本部分列出的所有用例。

  • 指定数据的含义。创建一个集中式元数据代码库,供多个临时 Dataproc 集群共享。使用不同的开源软件 (OSS) 引擎,例如 [Apache Hive](https://hive.apache.org、Apache SparkPresto

  • 构建数据的统一数据视图。在 Google Cloud 服务(如 Dataproc、Dataplex 和 BigQuery)之间提供互操作性,或者使用 Google Cloud 上其他基于开源的合作伙伴产品。

特性和优势

除非另有说明,否则 Dataproc Metastore 2 和 Dataproc Metastore 1 支持本部分中列出的所有功能。

  • OSS 兼容性。连接到现有的数据处理引擎,例如 Apache Hive、Apache Spark 和 Presto。

  • 管理。在几分钟内创建或更新 Metastore,并完成完全配置的监控和操作任务。

  • 集成。与其他 Google Cloud 产品集成,例如使用 BigQuery 作为 Dataproc 集群的元数据来源。

  • 内置安全功能。使用已建立的 Google Cloud 安全协议,例如 Identity and Access Management (IAM)Kerberos 身份验证

  • 简单导入。将存储在外部 Hive Metastore Metastore 中的现有元数据导入 Dataproc Metastore 服务。

  • 自动备份。配置自动 Metastore 备份有助于避免数据丢失。

  • 性能监控。设置性能层级,以动态响应高密集型工作负载和高峰,无需预热或缓存。

  • 高可用性 (HA)

    • Dataproc Metastore 2:提供可用区级高可用性 (HA),无需任何特定配置或持续管理。这是通过跨所选区域的多个可用区自动复制后端数据库和 HMS 服务器来实现的。除可用区级高可用性外,Dataproc Metastore 2 还支持区域级高可用性和灾难恢复 (DR)。
    • Dataproc Metastore 1:默认情况下,该模块提供可用区级高可用性 (HA),无需任何特定配置或持续管理。这是通过在您选择的区域中的多个可用区中自动复制后端数据库和 HMS 服务器来实现的
  • 可扩缩性

    • Dataproc Metastore 2:使用横向扩缩系数来确定您的服务在给定时间需要使用多少资源。您可以手动控制缩放比例,也可以根据需要设置为自动扩缩(预览版)。
    • Dataproc Metastore 1:设置服务时,请选择开发者层级或企业层级。此层级决定了您的服务在给定时间需要使用多少资源。
  • 支持。受益于标准的 Google Cloud 服务等级协议 (SLA) 和支持渠道。

与 Google Cloud 集成

除非另有说明,否则本部分列出的所有集成均受 Dataproc Metastore 1 和 Dataproc Metastore 2 支持。

  • Dataproc。连接到 Dataproc 集群,以便为 OSS 大数据工作负载提供元数据。
  • BigQuery。在 Dataproc 工作负载中查询 BigQuery 数据集。
  • Dataplex。查询在 Dataplex 数据湖中发现的结构化和半结构化数据。
  • Data Catalog。将 Dataproc Metastore 与 Data Catalog 同步,支持搜索和发现元数据。
  • 日志记录和监控。将 Dataproc Metastore 与 Cloud Monitoring 和 Logging 产品集成。
  • Authentication 和 IAM。依赖其他 Google Cloud 产品使用的标准 OAuth 身份验证,它支持使用精细的 Identity and Access Management 角色为各个资源启用访问权限控制。

后续步骤