[ 
https://issues.apache.org/jira/browse/APEXCORE-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16046164#comment-16046164
 ] 

Sanjay M Pujare edited comment on APEXCORE-733 at 6/12/17 9:00 PM:
-------------------------------------------------------------------

[~PramodSSImmaneni] This is the proposed implementation. Pls confirm:

We will implement a new property called apex.dfsRootDirectory that will be used 
to determine the run-time "application path" of an Apex application. The new 
apex.dfsRootDirectory property will be used as follows:

- the Apex Client code will check if apex.dfsRootDirectory is defined; if not 
it will fall back to using dt.dfsRootDirectory as now. Let's call this value as 
Apex-root-dir in the below steps. Only when Apex-root-dir value is derived from 
apex.dfsRootDirectory the new logic kicks in (otherwise the existing logic 
stays).
- if Apex-root-dir value is an absolute path then it will scan for %USER_NAME% 
in that string and replace it with the user's name, otherwise it will use the 
absolute path as it is.
- if Apex-root-dir value is a relative path then it will be appended to the 
user's home directory.


In the above steps a "user" refers to either impersonating or impersonated user 
depending on the new option defined in this feature. The new option we will use 
is apex.application.path.impersonated . If true we will use the impersonated 
user to derive the application path else impersonating user.



was (Author: sanjaypujare):
[~PramodSSImmaneni] This is the proposed implementation. Pls confirm:

We will implement a new property called apex.dfsRootDirectory that will be used 
to determine the run-time "application path" of an Apex application. The new 
apex.dfsRootDirectory property will be used as follows:

- the Apex Client code will check if apex.dfsRootDirectory is defined; if not 
it will fall back to using dt.dfsRootDirectory as now. Let's call this value as 
Apex-root-dir in the below steps. Only when Apex-root-dir value is derived from 
apex.dfsRootDirectory the new logic kicks in (otherwise the existing logic 
stays).
- if Apex-root-dir value is an absolute path then it will scan for %USER_NAME% 
in that string and replace it with the user's name, otherwise it will use the 
absolute path as it is.
- if Apex-root-dir value is a relative path then it will be appended to the 
user's home directory.
- if Apex-root-dir is null (i.e. apex.dfsRootDirectory not defined) then the 
path will be derived by appending apex to the user's home directory (e.g. 
/user/testuser/apex). 

In the above steps a "user" refers to either impersonating or impersonated user 
depending on the new option defined in this feature. The new option we will use 
is apex.application.path.impersonated . If true we will use the impersonated 
user to derive the application path else impersonating user.


> Add ability to use impersonated user's HDFS path for storing application 
> resources
> ----------------------------------------------------------------------------------
>
>                 Key: APEXCORE-733
>                 URL: https://issues.apache.org/jira/browse/APEXCORE-733
>             Project: Apache Apex Core
>          Issue Type: Improvement
>            Reporter: Pramod Immaneni
>            Assignee: Sanjay M Pujare
>
> When an application is launched using impersonation, the impersonating user's 
> hdfs home folder is used to store application resources such as the jars 
> needed to launch the application and post launch checkpoints, tuple recording 
> etc.
> In some scenarios this is not desirable as the impersonated user needs to 
> have access to the impersonating user's folders. We need the ability to be 
> able to use the impersonated user's home folder in these cases.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to