Nvm, that wont work, because DriverWrapper is an object, not a class. You could do DriverWrapper.getClass.getName, but that would give org.apache.spark.deploy.worker.DriverWrapper$ (with a dollar at the end).