Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
YARN and HDFS log persistence (#2244)
Browse files Browse the repository at this point in the history
* rm log persist

* change log dir to host

* persist nm log to host

* resolve conflict

* persist namenode log

* persist data node log

* add comments

* move log path to common pai storage
  • Loading branch information
mzmssg authored Mar 6, 2019
1 parent 8cb09a1 commit 83b9114
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/hadoop-data-node/deploy/hadoop-data-node.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ spec:
name: host-confg-volume
- mountPath: /var/lib/hadoopdata
name: hadoop-tmp-storage
- mountPath: /var/log/hadoop
name: log-dir
readinessProbe:
exec:
command:
Expand Down Expand Up @@ -77,6 +79,11 @@ spec:
value: datanode-start-service.sh
- name: HADOOP_DATANODE_DATA_DIR
value: {{ mount_points|join(",") }}
# Rolling File Appender, by default it keeps at most 256M*20=5G logs.
- name: HADOOP_ROOT_LOGGER
value: INFO,console,RFA
- name: HADOOP_LOG_DIR
value: /var/log/hadoop
- name: POD_IP
valueFrom:
fieldRef:
Expand All @@ -98,6 +105,9 @@ spec:
- name: host-confg-volume
configMap:
name: host-configuration
- name: log-dir
hostPath:
path: {{ cluster_cfg["cluster"]["common"][ "data-path" ] }}/pai-service-log/data-node
tolerations:
- key: node.kubernetes.io/memory-pressure
operator: "Exists"
Expand Down
10 changes: 10 additions & 0 deletions src/hadoop-name-node/deploy/hadoop-name-node.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
name: hadoop-name-node-config-volume
- mountPath: /var/lib/hadoopdata
name: hadoop-tmp-storage
- mountPath: /var/log/hadoop
name: log-dir
readinessProbe:
exec:
command:
Expand All @@ -57,6 +59,11 @@ spec:
value: namenode-generate-script.sh
- name: START_SERVICE
value: namenode-start-service.sh
# Rolling File Appender, by default it keeps at most 256M*20=5G logs.
- name: HADOOP_ROOT_LOGGER
value: INFO,console,RFA
- name: HADOOP_LOG_DIR
value: /var/log/hadoop
{%- if cluster_cfg['cluster']['common']['qos-switch'] == "true" %}
resources:
limits:
Expand All @@ -74,3 +81,6 @@ spec:
- name: hadoop-tmp-storage
hostPath:
path: {{ cluster_cfg["cluster"]["common"][ "data-path" ] }}/hadooptmp/namenode
- name: log-dir
hostPath:
path: {{ cluster_cfg["cluster"]["common"][ "data-path" ] }}/pai-service-log/name-node
10 changes: 10 additions & 0 deletions src/hadoop-node-manager/deploy/hadoop-node-manager.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ spec:
name: host-confg-volume
- mountPath: /var/lib/hadoopdata
name: hadoop-tmp-storage
- mountPath: /var/log/hadoop
name: log-dir
readinessProbe:
exec:
command:
Expand Down Expand Up @@ -107,6 +109,11 @@ spec:
value: "3072"
- name: NV_DRIVER
value: /var/drivers/nvidia/current
# Rolling File Appender, by default it keeps at most 256M*20=5G logs.
- name: YARN_ROOT_LOGGER
value: INFO,console,RFA
- name: YARN_LOG_DIR
value: /var/log/hadoop
- name: POD_IP
valueFrom:
fieldRef:
Expand Down Expand Up @@ -144,6 +151,9 @@ spec:
- name: hadoop-tmp-storage
hostPath:
path: {{ cluster_cfg["cluster"]["common"][ "data-path" ] }}/hadooptmp/nodemanager
- name: log-dir
hostPath:
path: {{ cluster_cfg["cluster"]["common"][ "data-path" ] }}/pai-service-log/node-manager
tolerations:
- key: node.kubernetes.io/memory-pressure
operator: "Exists"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ spec:
name: yarn-resourcemanager-storage
- mountPath: /var/lib/hadoopdata
name: hadoop-tmp-storage
- mountPath: /var/log/hadoop
name: log-dir
- mountPath: /exclude-path
name: hadoop-resource-manager-exclude-nodes
readinessProbe:
Expand All @@ -78,6 +80,11 @@ spec:
value: resourcemanager-generate-script.sh
- name: START_SERVICE
value: resourcemanager-start-service.sh
# Rolling File Appender, by default it keeps at most 256M*20=5G logs.
- name: YARN_ROOT_LOGGER
value: INFO,console,RFA
- name: YARN_LOG_DIR
value: /var/log/hadoop
{%- if cluster_cfg['cluster']['common']['qos-switch'] == "true" %}
resources:
limits:
Expand Down Expand Up @@ -115,6 +122,9 @@ spec:
- name: hadoop-tmp-storage
hostPath:
path: {{ cluster_cfg["cluster"]["common"][ "data-path" ] }}/hadooptmp/resourcemanager
- name: log-dir
hostPath:
path: {{ cluster_cfg["cluster"]["common"][ "data-path" ] }}/pai-service-log/resource-manager
- name: hadoop-resource-manager-exclude-nodes
configMap:
name: exclude-file

0 comments on commit 83b9114

Please sign in to comment.