Thank you for the response.
As mentioned, it is working fine in the all-purpose compute. Does this mean that I should not use RDD APIs in a job cluster?
below is my all purpose compute config
"autotermination_minutes": 60,
"enable_elastic_disk": true,
"init_scripts": [],
"single_user_name": "user:mh@dmpa.com",
"enable_local_disk_encryption": false,
"data_security_mode": "SINGLE_USER",
"runtime_engine": "PHOTON",
"effective_spark_version": "15.4.x-photon-scala2.12",
"assigned_principal": "user:mh@dmpa.com",
"cluster_id": "19gu786758qhhjajiiusatu"