共享外部配置单元元存储如何依赖特定版本的 HDInsight(Hadoop) 集群?

How does shared external hive metastore depend on a specific version of HDInsight(Hadoop) cluster?

假设我们有一个外部 Hive Metastore,然后我们有一堆 Hadoop (HDInsight) 集群,我们在需要时删除和创建它们以进行处理,这些集群使用这个共享的 Hive Metastore。在某个阶段,当新版本可用时,我们将开始使用较新版本的 HDInsight 创建这些集群。现在,假设外部 Metastore 在所有这些过程中保持固定(不会重新创建),它会不会给 HDInsight 的未来版本带来问题?或者每次我们开始使用新版本的 HDInsight 时,我们也必须将外部 Metastore 迁移到更新版本吗? Hive Metastore 和 HDInsight 集群之间的这种关系如何发挥作用?

通过 Hive Metastore 的 'version',我的意思是 - 有一个特定的外部 Hive Metastore 不存在的时间点,然后第一个 HDInsight(Hadoop) 集群将被创建并且为空 SQL 服务器数据库实例将在集群创建期间指定。作为集群创建的一部分,托管 Hive Metastore 的数据库将填充 Hive 元数据。所以这就是我所说的 Metastore 'version' 的意思——可能它获得的版本与与正在创建的特定 HDInsight 集群版本关联的 Hive 组件相同。

注意:当针对现有自定义 Metastore 数据库创建新的更高版本的 Azure HDInsight 时,系统会升级 Metastore 的架构,这是不可逆的,无需恢复来自备份的数据库。

如果跨多个集群共享元存储,请确保所有集群的 HDInsight 版本相同。不同的 Hive 版本使用不同的 Metastore 数据库模式。例如,您不能在 Hive 2.1 和 Hive 3.1 版本化集群之间共享元存储。

详情请参考“Hive metastore best practices”。

希望对您有所帮助。