> On Aug. 24, 2017, 12:19 a.m., Peter Bacsko wrote: > > core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java > > Lines 1094 (patched) > > <https://reviews.apache.org/r/61734/diff/1/?file=1799993#file1799993line1094> > > > > I would rewrite this part a bit. > > > > If we're running on a secure cluster, then let's always create a > > Credentials object and call this method. By doing so we don't need this > > null check.
Moved the check to `checkCredentials()` and called from `submitLauncher()` just before the `acquireHDFSDelegationToken()` call. We cannot always create a `Credentials` because we need `credentialsProperties` for that. > On Aug. 24, 2017, 12:19 a.m., Peter Bacsko wrote: > > core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java > > Lines 699 (patched) > > <https://reviews.apache.org/r/61734/diff/1/?file=1799994#file1799994line710> > > > > When this can be thrown? Does it mean an error that we somehow > > circumvent? If it is, then probably we should log something on WARN level. [`NetUtils#createSocketAddress(String, int, String)`](https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java#L198-L200), logging a `WARN` message nevertheless. - András ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61734/#review183689 ----------------------------------------------------------- On Aug. 18, 2017, 1:48 p.m., András Piros wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61734/ > ----------------------------------------------------------- > > (Updated Aug. 18, 2017, 1:48 p.m.) > > > Review request for oozie, Peter Cseh, Peter Bacsko, and Robert Kanter. > > > Repository: oozie-git > > > Description > ------- > > In a secure environment, when both HDFS HA and log aggregation are turned on, > `JavaActionExecutor` is not able to call `YarnClient#submitApplication` since > `HDFS_DELEGATION_TOKEN` is missing. > > In those cases we need to get `HDFS_DELEGATION_TOKEN` from YARN: > > * get server principal / YARN renewer via > `HadoopAccessorService#getServerPrincipal` > * get `HDFS_DELEGATION_TOKEN` via `DFSClient#getDelegationToken` > * add `HDFS_DELEGATION_TOKEN` to `Credentials` > > > Diffs > ----- > > core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java > dc17950418ada9b4848ed5597702a29e7124ab38 > core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java > b507c79d44aa2095caf532a5f4d19d20c1a30630 > > > Diff: https://reviews.apache.org/r/61734/diff/1/ > > > Testing > ------- > > `TestJavaActionExecutor`, `TestHadoopAccessorService` > > > Thanks, > > András Piros > >
