I am trying to execute a python script from a Spark scala job in cluster mode like shown below.
import scala.sys.process._
Process("sudo -n python helloWorld.py").!!
I get "sudo: a password is required" message.
I tried setting NOPASSWD as explained in link for the user by adding a line at the end of the file using 'sudo visudo' like below:
<username> ALL=(ALL) NOPASSWD: ALL
However it did not work. I still get the same error. What could be wrong?