Unable to run loadSampleData.sh script due to insufficient cores

Learn how to fix the insufficient cores issue when running the loadSampleData.sh script.

Problem

An error is returned when you run the loadSampleData.sh script on cloud environments.

Cause

The loadSampleData.sh script is unable to run because of the following error message:
Spark job was not submitted due to lack of resources; insufficient cores available.

Resolution

Use the following steps to resolve the insufficient cores error:

  1. Edit the spark slave deployment by the using the following command:
    oc edit deployment <spark-slave-deployment>
    Where <spark-slave-deployment> can resemble releasename-spark-slave.

  2. Change the spark-slave container CPU resources limits to 3.
    resources:
      limits:
        cpu: "3"
        memory: 7500Mi