'Return the job deployment directory in HDFS, creating it if necessary.
The actual deployment dir should be 0711 owned by the user'

def _create_deployment_dir(self):

    create_directories(self.fs)
    if (self.user != self.job.owner):
        path = Hdfs.join(REMOTE_DEPLOYMENT_DIR.get(), ('_%s_-oozie-%s-%s' % (self.user.username, self.job.id, time.time())))
        if self.fs.exists(self.job.deployment_dir):
            self.fs.copy_remote_dir(self.job.deployment_dir, path, owner=self.user, dir_mode=457)
        else:
            self._create_dir(path)
    else:
        path = self.job.deployment_dir
        self._create_dir(path)
    return path
