Summary
This article describes how to change HDFS NameNode configuration
Question
How to change HDFS NameNode configuration if an incorrect HDFS NameNode hostname was entered during deployment
Answer
Suppose you made a mistake during deployment and wrote an incorrect HDFS NameNode hostname.
In this case hdfs-datanode pod will be crashing:
hdfs-datanode-8fhfr 0/1 CrashLoopBackOff 6 9m42s
Do you need to redeploy?
No.
You can edit the HDFS NameNode hostname without redeployment.
Run the following kubectl command:
kubectl edit cm -n <your arcsight-installer namespace> datanode-config
Edit the HDFS NameNode hostname in 3 lines,
i.e.
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
data:
CORE_CONF_fs_defaultFS: hdfs://<HDFS_NameNode_FQDN>:30820
HDFS_CONF_dfs_datanode_address: 0.0.0.0:30010
HDFS_CONF_dfs_namenode_datanode_registration_ip___hostname___check: "false"
HDFS_CONF_dfs_namenode_http___address: <HDFS_NameNode_FQDN>:30070
HDFS_CONF_dfs_namenode_rpc___address: <HDFS_NameNode_FQDN>:30820
HDFS_CONF_dfs_permissions_superusergroup: hadoop
kind: ConfigMap
metadata:
creationTimestamp: "2021-05-03T16:52:23Z"
name: datanode-config
namespace: arcsight-installer-x8jja
resourceVersion: "10057444"
selfLink: /api/v1/namespaces/arcsight-installer-x8jja/configmaps/datanode-config
uid: c87c8714-601e-452a-a078-55f01df62ea7
Delete the datanode pod(s) after the edit:
kubectl delete pod -n <your arcsight-installer namespace> hdfs-datanode-*****
The pod(s) will be recreated with the correct HDFS NameNode parameteres.