Sync OOZIE-1242 and OOZIE-1233 with trunk

git-svn-id: https://svn.apache.org/repos/asf/oozie/branches/branch-4.0@1458007 13f79535-47bb-0310-9956-ffa450edef68