配置 HivePlus
HivePlus 的行为由类路径中的配置文件 hive-site.xml 指定。以下是 HivePlus 相关配置键的说明。
| Name | Default value | Description |
|---|---|---|
| hive.execution.engine | tez | 应设置为 tez 以使用 MR3 作为执行引擎。 |
| hive.execution.mode | container | HivePlus 支持 container 或 llap。使用 container 以获得稳定执行,使用 llap 以获得快速执行。 |
| hive.mr3.application.name.prefix | hive-mr3 | MR3 应用程序名称的前缀 |
| hive.mr3.client.connect.timeout | 60000ms | HivePlus 建立到 MR3 DAGAppMaster 连接的 timeout |
| hive.mr3.resource.vcores.divisor | 1 | 核心数的除数。合法值是 1 到 1000(含)之间的整数。影响以下配置键的解释:hive.mr3.map.task.vcores、hive.mr3.reduce.task.vcores、hive.mr3.all-in-one.containergroup.vcores、hive.mr3.map.containergroup.vcores、hive.mr3.reduce.containergroup.vcores、hive.mr3.llap.daemon.task.vcores。例如,如果 hive.mr3.resource.vcores.divisor 设置为 1000,则值 1 被解释为千分之一核。 |
| hive.mr3.map.task.memory.mb | -1 | 分配给每个 mapper 的内存(MB)。如果设置为 -1,HivePlus 读取 MRJobConfig.MAP_MEMORY_MB。可以设置为 0(但不推荐)。 |
| hive.mr3.reduce.task.memory.mb | -1 | 分配给每个 reducer 的内存(MB)。如果设置为 -1,HivePlus 读取 MRJobConfig.REDUCE_MEMORY_MB。可以设置为 0(但不推荐)。 |
| hive.mr3.map.task.vcores | -1 | 分配给每个 mapper 的核心数。如果设置为 -1,HivePlus 读取 MRJobConfig.MAP_CPU_VCORES。可以设置为 0(在某些情况下很方便)。 |
| hive.mr3.reduce.task.vcores | -1 | 分配给每个 reducer 的核心数。如果设置为 -1,HivePlus 读取 MRJobConfig.REDUCE_CPU_VCORES。可以设置为 0(在某些情况下很方便)。 |
| hive.mr3.dag.queue.capacity.specs | MR3 中容量调度的规格。仅在设置为非空字符串时有效。对应 mr3-site.xml 中的 mr3.dag.queue.capacity.specs。 | |
| hive.mr3.dag.queue.name | default | 查询的 Task 队列名称。与 MR3 中的容量调度一起使用。对应 mr3-site.xml 中的 mr3.dag.queue.name,可以为单个查询设置。 |
| hive.mr3.dag.include.indeterminate.vertex | false | true:DAG 包含不确定 Vertex,其输出每次执行都可能不同。当 fetch 失败发生时不支持容错。false:DAG 不包含不确定 Vertex。对应 mr3-site.xml 中的 mr3.dag.include.indeterminate.vertex,可以为单个查询设置。如果设置为 true,请将 hive.mr3.am.task.max.failed.attempts 设置为 1。 |
| hive.mr3.container.max.java.heap.fraction | 0.8 | 用作 Java 堆的 task 内存比例。在创建每个 MR3Session 时固定。对应 mr3-site.xml 中的 mr3.container.max.java.heap.fraction。 |
| hive.mr3.containergroup.scheme | all-in-one | ContainerGroup 方案:all-in-one、per-map-reduce 或 per-vertex。更多详情请参阅 ContainerGroup 方案。 |
| hive.mr3.container.env | ContainerGroup 的环境字符串 | |
| hive.mr3.container.java.opts | ContainerGroup 的 Java 选项。此键优先于 mr3-site.xml 中的 MR3Conf.MR3_CONTAINER_LAUNCH_CMD_OPTS(mr3.container.launch.cmd-opts)。 | |
| hive.mr3.container.stop.cross.dag.reuse | false | true:停止 ContainerGroup 的跨 DAG 容器重用。false:继续 ContainerGroup 的跨 DAG 容器重用。对应 mr3-site.xml 中的 mr3.container.stop.cross.dag.reuse,可以为单个查询设置。 |
| hive.mr3.container.reuse | true | true:允许容器重用以运行不同 task。false:不允许容器重用。对应 mr3-site.xml 中的 mr3.container.reuse。 |
| hive.mr3.container.combine.taskattempts | true | true:允许同一容器中的多个并发 task。false:不允许同一容器中的多个并发 task。对应 mr3-site.xml 中的 mr3.container.combine.taskattempts。 |
| hive.mr3.container.mix.taskattempts | true | true:允许同一容器中来自不同 DAG 的并发 task。false:不允许同一容器中来自不同 DAG 的并发 task。对应 mr3-site.xml 中的 mr3.container.mix.taskattempts。 |
| hive.mr3.container.max.num.workers | Int.MaxValue | ContainerGroup 可以创建的最大容器数。对应 mr3-site.xml 中的 mr3.container.max.num.workers。 |
| hive.mr3.container.use.per.query.cache | true | true:使用同一容器中所有 task 共享的 per-query 缓存。false:不使用。 |
| hive.mr3.all-in-one.containergroup.memory.mb | -1 | 在 all-in-one 方案下分配给每个 ContainerGroup 的内存(MB)。如果设置为 0 或更小,则重置为默认值 1024。 |
| hive.mr3.all-in-one.containergroup.vcores | -1 | 在 all-in-one 方案下分配给每个 ContainerGroup 的核心数。如果设置为 0 或更小,则重置为默认值 1。 |
| hive.mr3.map.containergroup.memory.mb | -1 | 在 per-map-reduce 或 per-vertex 方案下分配给每个 mapper ContainerGroup 的内存(MB)。如果设置为 -1,HivePlus 读取 MRJobConfig.MAP_MEMORY_MB。可以设置为 0(但不推荐)。 |
| hive.mr3.reduce.containergroup.memory.mb | -1 | 在 per-map-reduce 或 per-vertex 方案下分配给每个 reducer ContainerGroup 的内存(MB)。如果设置为 -1,HivePlus 读取 MRJobConfig.REDUCE_MEMORY_MB。可以设置为 0(但不推荐)。 |
| hive.mr3.map.containergroup.vcores | -1 | 在 per-map-reduce 或 per-vertex 方案下分配给每个 mapper ContainerGroup 的核心数。如果设置为 -1,HivePlus 读取 MRJobConfig.MAP_CPU_VCORES。可以设置为 0(但不推荐)。 |
| hive.mr3.reduce.containergroup.vcores | -1 | 在 per-map-reduce 或 per-vertex 方案下分配给每个 reducer ContainerGroup 的核心数。如果设置为 -1,HivePlus 读取 MRJobConfig.REDUCE_CPU_VCORES。可以设置为 0(但不推荐)。 |
| hive.mr3.exec.print.summary | false | true:显示每个查询的执行步骤细分。false:不显示。 |
| hive.llap.io.enabled | false | true:使用 LLAP I/O。false:不使用 LLAP I/O。 |
| hive.mr3.llap.headroom.mb | 0 | 启用 LLAP I/O 时分配给 Java VM 开销的 headroom 内存(MB) |
| hive.mr3.llap.daemon.task.memory.mb | 0 | 分配给 LLAP I/O 的 DaemonTaskAttempt 的内存(MB) |
| hive.mr3.llap.daemon.task.vcores | 0 | 分配给 LLAP I/O 的 DaemonTaskAttempt 的核心数 |
| hive.mr3.llap.orc.memory.per.thread.mb | 1024 | 分配给低级 LLAP I/O 线程中每个 ORC 管理器的内存(MB) |
| hive.mr3.exec.inplace.progress | true | true:在终端中就地更新执行进度。false:不更新。 |
| hive.mr3.use.daemon.shufflehandler | 0 | 每个 ContainerWorker 中的 shuffle handler 数量。对应 mr3-site.xml 中的 mr3.use.daemon.shufflehandler。 |
| hive.server2.mr3.share.session | false | true:以共享会话模式运行 HiveServer2。false:以独立会话模式运行 HiveServer2。更多详情请参阅 HiveServer2 模式。 |
| hive.mr3.mapjoin.interrupt.check.interval | 100000L | HashTableLoader 检查中断状态的间隔(以条目数计) |
| hive.mr3.dag.additional.credentials.source | 获取凭据的附加路径的逗号分隔列表。如果查询没有输入文件(例如,在创建新表或向现有表插入值时),HDFS token 可能为空。在这种情况下,用户可以提供附加路径以获取凭据,以便可以使用正确的 HDFS token 执行查询。 | |
| hive.mr3.localize.session.jars | true | true:将 hive-exec.jar 本地化为本地资源。false:不将 hive-exec.jar 本地化(用于 Kubernetes 上的 Hive)。 |
| hive.mr3.aux.jars | 要包含为初始会话资源的附加 jar 文件的逗号分隔列表 | |
| hive.mr3.am.task.max.failed.attempts | 3 | 每个 Task 的最大尝试次数。对应 mr3-site.xml 中的 mr3.am.task.max.failed.attempts,可以为单个查询设置。 |
| hive.mr3.delete.vertex.local.directory | false | true:当所有目标 Vertex 完成后删除 Vertex 的中间数据目录。false:不删除。对应 mr3-site.xml 中的 mr3.am.notify.destination.vertex.complete,可以为单个查询设置。 |
| hive.mr3.am.task.concurrent.run.threshold.percent | 100.0 | 开始推测执行前完成 Task 的百分比。可以设置为高达 100.0 的浮点数。设置为 100.0 会禁用 TaskAttempt 的推测执行。对应 mr3-site.xml 中的 mr3.am.task.concurrent.run.threshold.percent,可以为单个查询设置。 |
| hive.mr3.zookeeper.appid.namespace | mr3AppId | 用于共享 Application ID 的 ZooKeeper 命名空间 |
| hive.tez.llap.min.reducer.per.executor | 0.2 | 用于 Reducer 的 Task 数量的比例。 |
| hive.mr3.compaction.using.mr3 | false | true:使用 MR3 执行压缩。应启用高可用性。false:使用 MapReduce 执行压缩。 |
| hive.mr3.session.config.remove.prefixes | 要从 JobConf 中移除的键前缀的逗号分隔列表,以传递给 MR3 session | |
| hive.mr3.dag.config.remove.prefixes | 要从 JobConf 中移除的键前缀的逗号分隔列表,以传递给 MR3 DAG |