Skip to content

Commit

Permalink
hive和yarn容器注入环境变量HADOOP_CONF_DIR,修复容器内无法使用hadoop命令查看fs问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Pandas886 committed Dec 28, 2023
1 parent 09f054c commit 7f0605c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cloudeon-stack/EDP-1.0.0/hive/k8s/hive-metastore.yaml.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ spec:
env:
- name: "SERVICE_NAME"
value: "metastore"
- name: HADOOP_CONF_DIR
value: /opt/edp/${service.serviceName}/conf
- name: "HIVE_CONF_DIR"
value: "/opt/edp/${service.serviceName}/conf"
- name: MEM_LIMIT
Expand Down
2 changes: 2 additions & 0 deletions cloudeon-stack/EDP-1.0.0/hive/k8s/hive-server2.yaml.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ spec:
env:
- name: "SERVICE_NAME"
value: "server2"
- name: HADOOP_CONF_DIR
value: /opt/edp/${service.serviceName}/conf
- name: "HIVE_CONF_DIR"
value: "/opt/edp/${service.serviceName}/conf"
- name: MEM_LIMIT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ spec:
memory: "${conf['hadop.yarn.hs.container.limit.memory']}Mi"
cpu: "${conf['hadop.yarn.hs.container.limit.cpu']}"
env:
- name: HADOOP_CONF_DIR
value: /opt/edp/${service.serviceName}/conf
- name: MEM_LIMIT
valueFrom:
resourceFieldRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ spec:
valueFrom:
resourceFieldRef:
resource: limits.memory
- name: HADOOP_CONF_DIR
value: /opt/edp/${service.serviceName}/conf
- name: yarnHeapRam
value: "${conf['yarn.nodemanager.heap.memory']}"
securityContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ spec:
memory: "${conf['hadop.yarn.rm.container.limit.memory']}Mi"
cpu: "${conf['hadop.yarn.rm.container.limit.cpu']}"
env:
- name: HADOOP_CONF_DIR
value: /opt/edp/${service.serviceName}/conf
- name: MEM_LIMIT
valueFrom:
resourceFieldRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ spec:
memory: "${conf['hadop.yarn.tl.container.limit.memory']}Mi"
cpu: "${conf['hadop.yarn.tl.container.limit.cpu']}"
env:
- name: HADOOP_CONF_DIR
value: /opt/edp/${service.serviceName}/conf
- name: MEM_LIMIT
valueFrom:
resourceFieldRef:
Expand Down

0 comments on commit 7f0605c

Please sign in to comment.