I don't know if this is a noob question or not, but my various google searches yielded nothing.
When I run my application, which uses spark-submit under the hood, without sudo, it works. But when I use it with sudo, it just says "spark-submit is not found" or whatever that is.
After (not much) further inspection : which spark-submit yields results, sudo which spark-submit does not.
I edited the secure path using sudo visudo, saved changes, still nothing.
EDIT: Wow, I'm dumb as a box of rocks. I added spark's main folder to sudoers file, I should have added /bin of it. Now sudo which spark-submit yields proper result.
But even now, spark-submit is still not being found.