By default, Db2® Big
SQL connects to
DataNodes by using the IP address provided by the NameNode. Depending on the network configuration,
this IP address might be unreachable from Db2 Big
SQL.
About this task
To resolve this problem, let Db2 Big
SQL use
DNS resolution of the DataNode hostname.
Procedure
- Log in to your OpenShift® cluster as a project administrator:
oc login <OpenShift_URL>:<port>
- Change to the project where the Cloud Pak for Data control
plane is installed:
oc project ${PROJECT_CPD_INSTANCE}
- Identify the Db2 Big
SQL instance ID:
oc get cm -l component=db2bigsql -o custom-columns="Instance Id:{.data.instance_id},Instance Name:{.data.instance_name},Created:{.metadata.creationTimestamp}"
-
Get the name of the Db2 Big
SQL head
pod:
head_pod=$(oc get pod -l app=bigsql-<instance_id>,name=dashmpp-head-0 --no-headers=true -o=custom-columns=NAME:.metadata.name)
- Set the client configuration:
oc exec -i $head_pod -- sudo su - db2inst1 -c "/usr/ibmpacks/current/bigsql/bigsql/bigsql-cli/python/bigsql_config.py set-property --xml-path /etc/hadoop/conf/hdfs-site.xml --name dfs.client.use.datanode.hostname --value true"
- Restart Db2 Big
SQL:
oc exec -i $head_pod -- sudo su - db2inst1 -c "bigsql stop; bigsql start"