[jira] [Comment Edited] (YARN-10070) NPE if no rule is defined and application-tag-based-placement is enabled

2020-01-16 Thread Kinga Marton (Jira)


[ 
https://issues.apache.org/jira/browse/YARN-10070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17016855#comment-17016855
 ] 

Kinga Marton edited comment on YARN-10070 at 1/16/20 12:22 PM:
---

Thank you [~prabhujoseph] and [~adam.antal] for the review!


was (Author: kmarton):
hank you [~prabhujoseph] and [~adam.antal] for the review!

> NPE if no rule is defined and application-tag-based-placement is enabled
> 
>
> Key: YARN-10070
> URL: https://issues.apache.org/jira/browse/YARN-10070
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Kinga Marton
>Assignee: Kinga Marton
>Priority: Major
> Fix For: 3.3.0
>
> Attachments: YARN-10070.001.patch, YARN-10070.002.patch, 
> YARN-10070.003.patch
>
>
> If there is no rule defined for a user NPE is thrown by the following line.
> {code:java}
> String queue = placementManager
>  .placeApplication(context, usernameUsedForPlacement).getQueue();{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Comment Edited] (YARN-10070) NPE if no rule is defined and application-tag-based-placement is enabled

2020-01-14 Thread Kinga Marton (Jira)


[ 
https://issues.apache.org/jira/browse/YARN-10070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17015012#comment-17015012
 ] 

Kinga Marton edited comment on YARN-10070 at 1/14/20 11:19 AM:
---

Thank you [~prabhujoseph] for the review! I have uploaded a new patch with 
fixing the checkstyle issues.


was (Author: kmarton):
Thank you [~prabhujoseph] for the review! I have uploaded a new patch with the 
checkstyle issues.

> NPE if no rule is defined and application-tag-based-placement is enabled
> 
>
> Key: YARN-10070
> URL: https://issues.apache.org/jira/browse/YARN-10070
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Kinga Marton
>Assignee: Kinga Marton
>Priority: Major
> Attachments: YARN-10070.001.patch, YARN-10070.002.patch
>
>
> If there is no rule defined for a user NPE is thrown by the following line.
> {code:java}
> String queue = placementManager
>  .placeApplication(context, usernameUsedForPlacement).getQueue();{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Comment Edited] (YARN-10070) NPE if no rule is defined and application-tag-based-placement is enabled

2020-01-12 Thread Kinga Marton (Jira)


[ 
https://issues.apache.org/jira/browse/YARN-10070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17013847#comment-17013847
 ] 

Kinga Marton edited comment on YARN-10070 at 1/12/20 6:44 PM:
--

Thank you [~prabhujoseph] for checking it.

I think I found the bug in the code part you have shared:
 * the logic it should be followed is: we should check if the submitting user 
(hive) has access to submit application in the queue of the user from the 
application tag (tezq). If no, the placement will be done using the submitting 
user (hive) instead of the one from the application tag (ambart-qa), so it 
should be placed to the default queue.
 * The bug is in the following code:

{code:java}
String queue = placementManager
  .placeApplication(context, usernameUsedForPlacement).getQueue();
{code}
 - here {{usernameUsedForPlacement}} should be replaced with 
{{userNameFromApptag}} in order to get the queue the application would be 
placed.
{code:java}
 UserGroupInformation callerUGI = UserGroupInformation
  .createRemoteUser(userNameFromAppTag);
{code}

 - here {{userNameFromAppTag}} should be replaced with {{user}}, so we can 
check than if the user(hive) has access to submit applications to the queue 
where the application would be placed using the username from the apptag(tezq).

 


was (Author: kmarton):
Thank you [~prabhujoseph] for checking it.

I think I found the bug in the code part you have shared:
 * the logic it should be followed is: we should check if the submitting use 
(hive) has access to submit application in the queue of the user from the 
application tag (tezq). If no, the placement will be done using the submitting 
user (hive) instead of the one from the application tag (ambart-qa), so it 
should be placed to the default queue.
 * The bug is in the following code:

{code:java}
String queue = placementManager
  .placeApplication(context, usernameUsedForPlacement).getQueue();
{code}
- here {{usernameUsedForPlacement}} should be replaces with 
{{userNameFromApptag}} in order to get the queue the application would be 
placed. 
{code:java}
 UserGroupInformation callerUGI = UserGroupInformation
  .createRemoteUser(userNameFromAppTag);
{code}
- here {{userNameFromAppTag}} should be replaced with {{user}}, so we can check 
than if the user(hive) has access to submit applications to the queue where the 
application would be placed using the username from the apptag(tezq).

 

> NPE if no rule is defined and application-tag-based-placement is enabled
> 
>
> Key: YARN-10070
> URL: https://issues.apache.org/jira/browse/YARN-10070
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Kinga Marton
>Assignee: Kinga Marton
>Priority: Major
>
> If there is no rule defined for a user NPE is thrown by the following line.
> {code:java}
> String queue = placementManager
>  .placeApplication(context, usernameUsedForPlacement).getQueue();{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org