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

Expose log retain time #2034

Merged
merged 5 commits into from
Jan 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions deployment/quick-start/services-configuration.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ cluster:

#Uncomment following lines if you want to customize yarn
#hadoop-resource-manager:
# # job log retain time
# yarn_log_retain_seconds: 2592000
# # port for yarn exporter
# yarn_exporter_port: 9459
# # Step 1 of 4 to set up Hadoop queues.
Expand Down
2 changes: 2 additions & 0 deletions examples/cluster-configuration/services-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@

#Uncomment following lines if you want to customize yarn
#hadoop-resource-manager:
# # job log retain time
# yarn_log_retain_seconds: 2592000
# # port for yarn exporter
# yarn_exporter_port: 9459
# # Step 1 of 4 to set up Hadoop queues.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ cp /hadoop-configuration/hadoop-env.sh $HADOOP_CONF_DIR/hadoop-env.sh
cp /hadoop-configuration/yarn-env.sh $HADOOP_CONF_DIR/yarn-env.sh
cp /hadoop-configuration/mapred-site.xml $HADOOP_CONF_DIR/mapred-site.xml

HOST_NAME=`hostname`
/usr/local/host-configure.py -c /host-configuration/host-configuration.yaml -f $HADOOP_CONF_DIR/hdfs-site.xml -n $HOST_NAME

sed -i "s/{HDFS_ADDRESS}/${HDFS_ADDRESS}/g" $HADOOP_CONF_DIR/core-site.xml

sed -i "s#{HADOOP_DATANODE_DATA_DIR}#${HADOOP_DATANODE_DATA_DIR}#g" $HADOOP_CONF_DIR/hdfs-site.xml
sed -i "s/{POD_IP}/${POD_IP}/g" $HADOOP_CONF_DIR/hdfs-site.xml
sed -i "s/{HDFS_ADDRESS}/${HDFS_ADDRESS}/g" $HADOOP_CONF_DIR/core-site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
rejected. It is recommended that this setting be left on to prevent accidental
registration of datanodes listed by hostname in the excludes file during a DNS
outage. Only set this to false in environments where there is no infrastructure
to support reverse DNS lookup.
to support reverse DNS lookup.
</description>
</property>

Expand All @@ -268,7 +268,7 @@

<property>
<name>dfs.datanode.hostname</name>
<value>{{ host_config['ip'] }}</value>
<value>{POD_IP}</value>
</property>

<property>
Expand Down
4 changes: 4 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 @@ -73,6 +73,10 @@ spec:
value: datanode-start-service.sh
- name: HADOOP_DATANODE_DATA_DIR
value: {{ mount_points|join(",") }}
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
imagePullSecrets:
- name: {{ cluster_cfg["cluster"]["docker-registry"]["secret-name"] }}
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

<property>
<name>yarn.log-aggregation.retain-seconds</name>
<value>604800</value>
<value>{{ cluster_cfg[ "hadoop-resource-manager" ][ "yarn_log_retain_seconds" ] }}</value>
</property>

<property>
Expand Down
1 change: 1 addition & 0 deletions src/hadoop-jobhistory/deploy/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ prerequisite:
template-list:
- hadoop-jobhistory.yaml
- delete.yaml
- hadoop-jobhistory-configuration/yarn-site.xml

start-script: start.sh
stop-script: stop.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ sed -i "s/{TIMELINE_SERVER_ADDRESS}/${TIMELINE_SERVER_ADDRESS}/g" $HADOOP_CONF_
sed -i "s#{HOST_YARN_NODEMANAGER_STORAGE}#${HOST_YARN_NODEMANAGER_STORAGE}#g" $HADOOP_CONF_DIR/yarn-site.xml
sed -i "s#{HOST_HADOOP_TMP_STORAGE}#${HOST_HADOOP_TMP_STORAGE}#g" $HADOOP_CONF_DIR/yarn-site.xml
sed -i "s#{CURRENT_IMAGE_NAME}#${CURRENT_IMAGE_NAME}#g" $HADOOP_CONF_DIR/yarn-site.xml
sed -i "s/{POD_IP}/${POD_IP}/g" $HADOOP_CONF_DIR/yarn-site.xml

sed -i "s/{HDFS_ADDRESS}/${HDFS_ADDRESS}/g" $HADOOP_CONF_DIR/core-site.xml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

<property>
<name>yarn.log-aggregation.retain-seconds</name>
<value>604800</value>
<value>{{ cluster_cfg[ "hadoop-resource-manager" ][ "yarn_log_retain_seconds" ] }}</value>
</property>

<property>
Expand All @@ -92,7 +92,7 @@

<property>
<name>yarn.nodemanager.hostname</name>
<value>{{ host_config['ip'] }}</value>
<value>{POD_IP}</value>
</property>

<property>
Expand Down Expand Up @@ -137,7 +137,7 @@

<property>
<name>yarn.nodemanager.address</name>
<value>{{ host_config['ip'] }}:8041</value>
<value>{POD_IP}:8041</value>
</property>

<property>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ spec:
value: "3072"
- name: NV_DRIVER
value: /var/drivers/nvidia/current
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
imagePullSecrets:
- name: {{ cluster_cfg["cluster"]["docker-registry"]["secret-name"] }}
volumes:
Expand Down
1 change: 1 addition & 0 deletions src/hadoop-node-manager/deploy/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ prerequisite:
template-list:
- hadoop-node-manager.yaml
- delete.yaml
- hadoop-node-manager-configuration/yarn-site.xml

start-script: start.sh
stop-script: stop.sh
Expand Down
7 changes: 7 additions & 0 deletions src/hadoop-resource-manager/config/hadoop-resource-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ hadoop-resource-manager:
capacity: 100

yarn_exporter_port: 9459
yarn_log_retain_seconds: 2592000
```


Expand Down Expand Up @@ -69,4 +70,10 @@ hadoop-resource-manager:
<td>cluster_cfg["hadoop-resource-manager"]["yarn_exporter_port"]</td>
<td>Int</td>
</tr>
<tr>
<td>hadoop-resource-manager.yarn_log_retain_seconds</td>
<td>com["hadoop-resource-manager"]["yarn_log_retain_seconds"]</td>
<td>cluster_cfg["hadoop-resource-manager"]["yarn_log_retain_seconds"]</td>
<td>Int</td>
</tr>
</table>
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ virtualClusters:
capacity: 100

yarn_exporter_port: 9459

yarn_log_retain_seconds: 2592000
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def run(self):
com = {}

com["yarn_exporter_port"] = self.service_configuration["yarn_exporter_port"]
com["yarn_log_retain_seconds"] = self.service_configuration["yarn_log_retain_seconds"]

for host_config in self.cluster_configuration["machine-list"]:
if "pai-master" in host_config and host_config["pai-master"] == "true":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

<property>
<name>yarn.log-aggregation.retain-seconds</name>
<value>604800</value>
<value>{{ cluster_cfg[ "hadoop-resource-manager" ][ "yarn_log_retain_seconds" ] }}</value>
</property>

<property>
Expand Down
1 change: 1 addition & 0 deletions src/hadoop-resource-manager/deploy/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ template-list:
- hadoop-resource-manager.yaml
- delete.yaml
- hadoop-resource-manager-configuration/capacity-scheduler.xml
- hadoop-resource-manager-configuration/yarn-site.xml

start-script: start.sh
stop-script: stop.sh
Expand Down