You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by András Piros <an...@cloudera.com> on 2017/08/18 13:48:29 UTC

Review Request 61734: OOZIE-3035 HDFS HA and log aggregation: getting HDFS delegation token from YARN renewer within JavaActionExecutor

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61734/
-----------------------------------------------------------

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


Re: Review Request 61734: OOZIE-3035 HDFS HA and log aggregation: getting HDFS delegation token from YARN renewer within JavaActionExecutor

Posted by András Piros <an...@cloudera.com>.

> 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.
> 
> András Piros wrote:
>     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.
> 
> Peter Bacsko wrote:
>     I've taken a deeper look into submitLauncher(). It's a bit more complicated than I thought.
>     
>     There is a property called "oozie.credentials.skip". If that's set to true, then delegation tokens won't be fetched and no credPropertiesMap will be created. But in that case, HDFS tokens cannot be added either.
>     
>     I assume that regardless of the "skip" property, we always have to add the HDFS token in a secure cluster to prevent lower-level issues but we can ask Robert about that.

Based on [Robert Kanter's comment](https://issues.apache.org/jira/browse/OOZIE-3035?focusedCommentId=16144101&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16144101) implementing `JavaActionExecutor#setCredentialPropertyToActionConf` in a way we also check for `UserGroupInformation#isSecurityEnabled` where we return `null` when `oozie.credentials.skip` is set in either `actionConf` or `wfJobConf`. Taking also the liberty to refactor that method for easier readability.


- András


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61734/#review183689
-----------------------------------------------------------


On Aug. 29, 2017, 8:44 a.m., András Piros wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61734/
> -----------------------------------------------------------
> 
> (Updated Aug. 29, 2017, 8:44 a.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 
>   core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java c51c64a18c74c73aa9907027992033a9975bf4d7 
> 
> 
> Diff: https://reviews.apache.org/r/61734/diff/3/
> 
> 
> Testing
> -------
> 
> `TestJavaActionExecutor`, `TestHadoopAccessorService`
> 
> 
> Thanks,
> 
> András Piros
> 
>


Re: Review Request 61734: OOZIE-3035 HDFS HA and log aggregation: getting HDFS delegation token from YARN renewer within JavaActionExecutor

Posted by András Piros <an...@cloudera.com>.

> 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
> 
>


Re: Review Request 61734: OOZIE-3035 HDFS HA and log aggregation: getting HDFS delegation token from YARN renewer within JavaActionExecutor

Posted by Peter Bacsko <pb...@cloudera.com>.

> On aug. 24, 2017, 12:19 de, 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.
> 
> András Piros wrote:
>     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.

I've taken a deeper look into submitLauncher(). It's a bit more complicated than I thought.

There is a property called "oozie.credentials.skip". If that's set to true, then delegation tokens won't be fetched and no credPropertiesMap will be created. But in that case, HDFS tokens cannot be added either.

I assume that regardless of the "skip" property, we always have to add the HDFS token in a secure cluster to prevent lower-level issues but we can ask Robert about that.


- Peter


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61734/#review183689
-----------------------------------------------------------


On aug. 24, 2017, 11:53 de, András Piros wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61734/
> -----------------------------------------------------------
> 
> (Updated aug. 24, 2017, 11:53 de)
> 
> 
> 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/2/
> 
> 
> Testing
> -------
> 
> `TestJavaActionExecutor`, `TestHadoopAccessorService`
> 
> 
> Thanks,
> 
> András Piros
> 
>


Re: Review Request 61734: OOZIE-3035 HDFS HA and log aggregation: getting HDFS delegation token from YARN renewer within JavaActionExecutor

Posted by Peter Bacsko <pb...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61734/#review183689
-----------------------------------------------------------




core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
Lines 1083 (patched)
<https://reviews.apache.org/r/61734/#comment259749>

    Let's just call it acquireHDFSDelegationToken()



core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
Lines 1087 (patched)
<https://reviews.apache.org/r/61734/#comment259756>

    Perform this check in submitLauncher() instead as I explained below.



core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
Lines 1094 (patched)
<https://reviews.apache.org/r/61734/#comment259750>

    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.



core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
Lines 1100 (patched)
<https://reviews.apache.org/r/61734/#comment259751>

    This can be deleted too



core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java
Lines 687 (patched)
<https://reviews.apache.org/r/61734/#comment259753>

    Incomplete javadoc



core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java
Lines 697 (patched)
<https://reviews.apache.org/r/61734/#comment259752>

    Minor: let's use {} or {0} placeholders so you don't have to concat strings.



core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java
Lines 699 (patched)
<https://reviews.apache.org/r/61734/#comment259754>

    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.


- Peter Bacsko


On aug. 18, 2017, 1:48 du, 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 du)
> 
> 
> 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
> 
>


Re: Review Request 61734: OOZIE-3035 HDFS HA and log aggregation: getting HDFS delegation token from YARN renewer within JavaActionExecutor

Posted by Peter Bacsko <pb...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61734/#review184144
-----------------------------------------------------------




core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
Lines 996 (patched)
<https://reviews.apache.org/r/61734/#comment260202>

    OK, finally I realized what the problem is with this approach :)
    
    So, I would just go ahead and create a Credentials object in secure mode if it doesn't exist at this point. It's necessary, because we can't add the HDFS token into it right now if it's null. But there are uses cases where users use only shell action and don't retrieve any delegation token for it (because they have keytabs localized instead - it's realistic).
    
    So it's necessary to always have HDFS tokens in secure mode, regardless of credentialsProperties.


- Peter Bacsko


On aug. 29, 2017, 8:44 de, András Piros wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61734/
> -----------------------------------------------------------
> 
> (Updated aug. 29, 2017, 8:44 de)
> 
> 
> 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 
>   core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java c51c64a18c74c73aa9907027992033a9975bf4d7 
> 
> 
> Diff: https://reviews.apache.org/r/61734/diff/3/
> 
> 
> Testing
> -------
> 
> `TestJavaActionExecutor`, `TestHadoopAccessorService`
> 
> 
> Thanks,
> 
> András Piros
> 
>


Re: Review Request 61734: OOZIE-3035 HDFS HA and log aggregation: getting HDFS delegation token from YARN renewer within JavaActionExecutor

Posted by Peter Bacsko <pb...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61734/#review184264
-----------------------------------------------------------


Ship it!




Ship It!

- Peter Bacsko


On aug. 30, 2017, 2:02 du, András Piros wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61734/
> -----------------------------------------------------------
> 
> (Updated aug. 30, 2017, 2:02 du)
> 
> 
> 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 
>   core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java c51c64a18c74c73aa9907027992033a9975bf4d7 
> 
> 
> Diff: https://reviews.apache.org/r/61734/diff/4/
> 
> 
> Testing
> -------
> 
> `TestJavaActionExecutor`, `TestHadoopAccessorService`
> 
> 
> Thanks,
> 
> András Piros
> 
>


Re: Review Request 61734: OOZIE-3035 HDFS HA and log aggregation: getting HDFS delegation token from YARN renewer within JavaActionExecutor

Posted by András Piros <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61734/
-----------------------------------------------------------

(Updated Aug. 30, 2017, 2:02 p.m.)


Review request for oozie, Peter Cseh, Peter Bacsko, and Robert Kanter.


Changes
-------

Addressing review comment to create `Credentials` object when not present in secure mode.


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 (updated)
-----

  core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java dc17950418ada9b4848ed5597702a29e7124ab38 
  core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java b507c79d44aa2095caf532a5f4d19d20c1a30630 
  core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java c51c64a18c74c73aa9907027992033a9975bf4d7 


Diff: https://reviews.apache.org/r/61734/diff/4/

Changes: https://reviews.apache.org/r/61734/diff/3-4/


Testing
-------

`TestJavaActionExecutor`, `TestHadoopAccessorService`


Thanks,

András Piros


Re: Review Request 61734: OOZIE-3035 HDFS HA and log aggregation: getting HDFS delegation token from YARN renewer within JavaActionExecutor

Posted by András Piros <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61734/
-----------------------------------------------------------

(Updated Aug. 29, 2017, 8:44 a.m.)


Review request for oozie, Peter Cseh, Peter Bacsko, and Robert Kanter.


Changes
-------

Addressing review comment based on Robert Kanter's feedback.


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 (updated)
-----

  core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java dc17950418ada9b4848ed5597702a29e7124ab38 
  core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java b507c79d44aa2095caf532a5f4d19d20c1a30630 
  core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java c51c64a18c74c73aa9907027992033a9975bf4d7 


Diff: https://reviews.apache.org/r/61734/diff/3/

Changes: https://reviews.apache.org/r/61734/diff/2-3/


Testing
-------

`TestJavaActionExecutor`, `TestHadoopAccessorService`


Thanks,

András Piros


Re: Review Request 61734: OOZIE-3035 HDFS HA and log aggregation: getting HDFS delegation token from YARN renewer within JavaActionExecutor

Posted by András Piros <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61734/
-----------------------------------------------------------

(Updated Aug. 24, 2017, 11:53 a.m.)


Review request for oozie, Peter Cseh, Peter Bacsko, and Robert Kanter.


Changes
-------

Addressing review comments.


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 (updated)
-----

  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/2/

Changes: https://reviews.apache.org/r/61734/diff/1-2/


Testing
-------

`TestJavaActionExecutor`, `TestHadoopAccessorService`


Thanks,

András Piros