Hive Metastore 有哪三种服务模式?生产环境推荐哪种?
中等Hive
答题要点
- 内嵌模式 (Embedded): 使用内置的 Derby 数据库。
- 缺点: 单 Session,只能链接一个客户端。只能用于测试。
- 本地模式 (Local):
- Metastore 服务和 Hive Driver 在同一个 JVM 进程中。
- 连接外部 MySQL 存储元数据。
- 缺点: 每个 Client 都要配置 JDBC 密码,不安全。
- 远程模式 (Remote): 推荐。
- Metastore 独立进程运行(
hive --service metastore)。 - Hive Client 通过 Thrift 协议连接 Metastore。
- 优点: 解耦,安全(数据库密码只有服务端知道),支持高可用。
- Metastore 独立进程运行(
完整解析在题库里看
核心知识点、易错点和面试官想听到什么;练过的题会进入记录,答错的进错题本。
去练这道题