79579082

Date: 2025-04-17 11:01:56
Score: 1.5
Natty:
Report link

I have faced the same issue when we tried to run spark3 in CDP cluster where spark2 also running as default.

Error:

/opt/cloudera/parcels/SPARK3/lib/spark3/bin/spark-class: line 101: CMD: bad array subscript

Adding env variable in the code before launching the spark launcher job did not work, so finally updated

/etc/profile.d/cdh.sh by adding below entries

export HADOOP_CONF_DIR=/opt/cloudera/parcels/SPARK3/lib/hadoop/etc/hadoop

export SPARK_CONF_DIR=/etc/spark3/conf

export SPARK_HOME=/opt/cloudera/parcels/SPARK3/lib/spark3

Above env variables can be printed out through printenv command.

Reasons:
  • Blacklisted phrase (1): did not work
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Nagaraj Vittal