[jira] [Commented] (YARN-11190) CS Mapping rule bug: User matcher does not work correctly for usernames with dot

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11190:
---

hadoop-yetus commented on PR #4471:
URL: https://github.com/apache/hadoop/pull/4471#issuecomment-137655

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 50s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  
|
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  41m 53s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   1m  6s |  |  trunk passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  compile  |   0m 55s |  |  trunk passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  checkstyle  |   0m 51s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m  2s |  |  trunk passed  |
   | -1 :x: |  javadoc  |   0m 55s | 
[/branch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4471/3/artifact/out/branch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-yarn-server-resourcemanager in trunk failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | +1 :green_heart: |  javadoc  |   0m 41s |  |  trunk passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   2m 10s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  24m 20s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 54s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m  0s |  |  the patch passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  javac  |   1m  0s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 50s |  |  the patch passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  javac  |   0m 50s |  |  the patch passed  |
   | -1 :x: |  blanks  |   0m  0s | 
[/blanks-eol.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4471/3/artifact/out/blanks-eol.txt)
 |  The patch has 4 line(s) that end in blanks. Use git apply --whitespace=fix 
<>. Refer https://git-scm.com/docs/git-apply  |
   | +1 :green_heart: |  checkstyle  |   0m 38s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   0m 54s |  |  the patch passed  |
   | -1 :x: |  javadoc  |   0m 39s | 
[/patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4471/3/artifact/out/patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-yarn-server-resourcemanager in the patch failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | +1 :green_heart: |  javadoc  |   0m 36s |  |  the patch passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   2m  3s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  23m 52s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  | 102m 29s |  |  
hadoop-yarn-server-resourcemanager in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 33s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 208m 18s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4471/3/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4471 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux 6f91d09d729f 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 
18:16:04 UTC 2022 x86_64 x86_64 

[jira] [Commented] (YARN-11190) CS Mapping rule bug: User matcher does not work correctly for usernames with dot

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11190:
---

szilard-nemeth commented on code in PR #4471:
URL: https://github.com/apache/hadoop/pull/4471#discussion_r1065129216


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/placement/csmappingrule/TestCSMappingPlacementRule.java:
##
@@ -65,6 +70,11 @@ public class TestCSMappingPlacementRule {
 
   @Rule
   public TemporaryFolder folder = new TemporaryFolder();
+  
+  @Before
+  public void setUp() {
+setLoggerToDebug();

Review Comment:
   yep, I wanted to have a more verbouse output and I think it's not bad to 
keep the debug logs for later.
   Is there any better way to increase verbosity of the logger? :) 





> CS Mapping rule bug: User matcher does not work correctly for usernames with 
> dot
> 
>
> Key: YARN-11190
> URL: https://issues.apache.org/jira/browse/YARN-11190
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: capacity scheduler
>Reporter: Szilard Nemeth
>Assignee: Szilard Nemeth
>Priority: Major
>  Labels: pull-request-available
> Attachments: testUserNameSetDefaultAndPlaceWith2Rules.log, 
> testUserNameSetDefaultAndPlaceWith2RulesUsernameReplacedWithDot.log, 
> testcases.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Given the following scenario, the placement engine does not work as expected.
> A user with a '.' (dot) inside his/her username submits a job.
> Let the username be "test.user"
> There are 2 mapping rules: 
> 1. The matcher matches the user with name "test.user" and has an associated 
> mapping rule action that sets the default queue to "root.user".
> 2. The second mapping rule matches the same user ("test.user") and places the 
> application to the default queue.
> *Expactation:*
> When the user with username "root.user" submits a job, the application will 
> be placed to queue "root.user".
> *Observed behaviour:* 
> The application is placed to test_dot_user.
> This means that the dot is replaced to "{_}dot{_}" too early so that the 
> default queue is set incorrectly.
>  
> I have attached a patch file that demonstrates this behaviour with 2 new 
> testcases along with the logs of these testcases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11190) CS Mapping rule bug: User matcher does not work correctly for usernames with dot

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11190:
---

szilard-nemeth commented on code in PR #4471:
URL: https://github.com/apache/hadoop/pull/4471#discussion_r1065128441


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/VariableContext.java:
##
@@ -149,6 +154,11 @@ public String get(String name) {
 String ret = variables.get(name);
 return ret == null ? "" : ret;
   }
+  
+  public String getOriginal(String name) {
+String ret = originalVariables.get(name);
+return ret;

Review Comment:
   fixed.





> CS Mapping rule bug: User matcher does not work correctly for usernames with 
> dot
> 
>
> Key: YARN-11190
> URL: https://issues.apache.org/jira/browse/YARN-11190
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: capacity scheduler
>Reporter: Szilard Nemeth
>Assignee: Szilard Nemeth
>Priority: Major
>  Labels: pull-request-available
> Attachments: testUserNameSetDefaultAndPlaceWith2Rules.log, 
> testUserNameSetDefaultAndPlaceWith2RulesUsernameReplacedWithDot.log, 
> testcases.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Given the following scenario, the placement engine does not work as expected.
> A user with a '.' (dot) inside his/her username submits a job.
> Let the username be "test.user"
> There are 2 mapping rules: 
> 1. The matcher matches the user with name "test.user" and has an associated 
> mapping rule action that sets the default queue to "root.user".
> 2. The second mapping rule matches the same user ("test.user") and places the 
> application to the default queue.
> *Expactation:*
> When the user with username "root.user" submits a job, the application will 
> be placed to queue "root.user".
> *Observed behaviour:* 
> The application is placed to test_dot_user.
> This means that the dot is replaced to "{_}dot{_}" too early so that the 
> default queue is set incorrectly.
>  
> I have attached a patch file that demonstrates this behaviour with 2 new 
> testcases along with the logs of these testcases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11190) CS Mapping rule bug: User matcher does not work correctly for usernames with dot

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11190:
---

brumi1024 commented on code in PR #4471:
URL: https://github.com/apache/hadoop/pull/4471#discussion_r1065128069


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/placement/csmappingrule/TestCSMappingPlacementRule.java:
##
@@ -65,6 +70,11 @@ public class TestCSMappingPlacementRule {
 
   @Rule
   public TemporaryFolder folder = new TemporaryFolder();
+  
+  @Before
+  public void setUp() {
+setLoggerToDebug();

Review Comment:
   Did you purposely left this here?





> CS Mapping rule bug: User matcher does not work correctly for usernames with 
> dot
> 
>
> Key: YARN-11190
> URL: https://issues.apache.org/jira/browse/YARN-11190
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: capacity scheduler
>Reporter: Szilard Nemeth
>Assignee: Szilard Nemeth
>Priority: Major
>  Labels: pull-request-available
> Attachments: testUserNameSetDefaultAndPlaceWith2Rules.log, 
> testUserNameSetDefaultAndPlaceWith2RulesUsernameReplacedWithDot.log, 
> testcases.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Given the following scenario, the placement engine does not work as expected.
> A user with a '.' (dot) inside his/her username submits a job.
> Let the username be "test.user"
> There are 2 mapping rules: 
> 1. The matcher matches the user with name "test.user" and has an associated 
> mapping rule action that sets the default queue to "root.user".
> 2. The second mapping rule matches the same user ("test.user") and places the 
> application to the default queue.
> *Expactation:*
> When the user with username "root.user" submits a job, the application will 
> be placed to queue "root.user".
> *Observed behaviour:* 
> The application is placed to test_dot_user.
> This means that the dot is replaced to "{_}dot{_}" too early so that the 
> default queue is set incorrectly.
>  
> I have attached a patch file that demonstrates this behaviour with 2 new 
> testcases along with the logs of these testcases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11190) CS Mapping rule bug: User matcher does not work correctly for usernames with dot

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11190:
---

szilard-nemeth commented on code in PR #4471:
URL: https://github.com/apache/hadoop/pull/4471#discussion_r1065127930


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/CSMappingPlacementRule.java:
##
@@ -228,7 +228,11 @@ private VariableContext createVariableContext(
   ApplicationSubmissionContext asc, String user) {
 VariableContext vctx = new VariableContext();
 
-vctx.put("%user", cleanName(user));
+String cleanedName = cleanName(user);
+if (!user.equals(cleanedName)) {
+  vctx.putOriginal("%user", user);
+}
+vctx.put("%user", cleanedName);

Review Comment:
   sure :) 





> CS Mapping rule bug: User matcher does not work correctly for usernames with 
> dot
> 
>
> Key: YARN-11190
> URL: https://issues.apache.org/jira/browse/YARN-11190
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: capacity scheduler
>Reporter: Szilard Nemeth
>Assignee: Szilard Nemeth
>Priority: Major
>  Labels: pull-request-available
> Attachments: testUserNameSetDefaultAndPlaceWith2Rules.log, 
> testUserNameSetDefaultAndPlaceWith2RulesUsernameReplacedWithDot.log, 
> testcases.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Given the following scenario, the placement engine does not work as expected.
> A user with a '.' (dot) inside his/her username submits a job.
> Let the username be "test.user"
> There are 2 mapping rules: 
> 1. The matcher matches the user with name "test.user" and has an associated 
> mapping rule action that sets the default queue to "root.user".
> 2. The second mapping rule matches the same user ("test.user") and places the 
> application to the default queue.
> *Expactation:*
> When the user with username "root.user" submits a job, the application will 
> be placed to queue "root.user".
> *Observed behaviour:* 
> The application is placed to test_dot_user.
> This means that the dot is replaced to "{_}dot{_}" too early so that the 
> default queue is set incorrectly.
>  
> I have attached a patch file that demonstrates this behaviour with 2 new 
> testcases along with the logs of these testcases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11190) CS Mapping rule bug: User matcher does not work correctly for usernames with dot

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11190:
---

brumi1024 commented on code in PR #4471:
URL: https://github.com/apache/hadoop/pull/4471#discussion_r1065127145


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/CSMappingPlacementRule.java:
##
@@ -228,7 +228,11 @@ private VariableContext createVariableContext(
   ApplicationSubmissionContext asc, String user) {
 VariableContext vctx = new VariableContext();
 
-vctx.put("%user", cleanName(user));
+String cleanedName = cleanName(user);
+if (!user.equals(cleanedName)) {
+  vctx.putOriginal("%user", user);
+}
+vctx.put("%user", cleanedName);

Review Comment:
   Ahh I've missed the putOriginal/put method differences, feel free to 
disregard this one.





> CS Mapping rule bug: User matcher does not work correctly for usernames with 
> dot
> 
>
> Key: YARN-11190
> URL: https://issues.apache.org/jira/browse/YARN-11190
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: capacity scheduler
>Reporter: Szilard Nemeth
>Assignee: Szilard Nemeth
>Priority: Major
>  Labels: pull-request-available
> Attachments: testUserNameSetDefaultAndPlaceWith2Rules.log, 
> testUserNameSetDefaultAndPlaceWith2RulesUsernameReplacedWithDot.log, 
> testcases.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Given the following scenario, the placement engine does not work as expected.
> A user with a '.' (dot) inside his/her username submits a job.
> Let the username be "test.user"
> There are 2 mapping rules: 
> 1. The matcher matches the user with name "test.user" and has an associated 
> mapping rule action that sets the default queue to "root.user".
> 2. The second mapping rule matches the same user ("test.user") and places the 
> application to the default queue.
> *Expactation:*
> When the user with username "root.user" submits a job, the application will 
> be placed to queue "root.user".
> *Observed behaviour:* 
> The application is placed to test_dot_user.
> This means that the dot is replaced to "{_}dot{_}" too early so that the 
> default queue is set incorrectly.
>  
> I have attached a patch file that demonstrates this behaviour with 2 new 
> testcases along with the logs of these testcases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11190) CS Mapping rule bug: User matcher does not work correctly for usernames with dot

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11190:
---

szilard-nemeth commented on code in PR #4471:
URL: https://github.com/apache/hadoop/pull/4471#discussion_r1065113707


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/CSMappingPlacementRule.java:
##
@@ -228,7 +228,11 @@ private VariableContext createVariableContext(
   ApplicationSubmissionContext asc, String user) {
 VariableContext vctx = new VariableContext();
 
-vctx.put("%user", cleanName(user));
+String cleanedName = cleanName(user);
+if (!user.equals(cleanedName)) {
+  vctx.putOriginal("%user", user);
+}
+vctx.put("%user", cleanedName);

Review Comment:
   Yeah, the whole point is that if we don't keep the originalName separately 
(e.g. test.user) then the VariableMatcher will try to match for test_dot_user 
instead) so subsequent mapping rule actions won't be applied.
   
   Just try this out by commenting out the code block you think is unnecessary, 
the test called 
TestCSMappingPlacementRule#testOriginalUserNameWithDotCanBeUsedInMatchExpression
 will fail immediately





> CS Mapping rule bug: User matcher does not work correctly for usernames with 
> dot
> 
>
> Key: YARN-11190
> URL: https://issues.apache.org/jira/browse/YARN-11190
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: capacity scheduler
>Reporter: Szilard Nemeth
>Assignee: Szilard Nemeth
>Priority: Major
>  Labels: pull-request-available
> Attachments: testUserNameSetDefaultAndPlaceWith2Rules.log, 
> testUserNameSetDefaultAndPlaceWith2RulesUsernameReplacedWithDot.log, 
> testcases.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Given the following scenario, the placement engine does not work as expected.
> A user with a '.' (dot) inside his/her username submits a job.
> Let the username be "test.user"
> There are 2 mapping rules: 
> 1. The matcher matches the user with name "test.user" and has an associated 
> mapping rule action that sets the default queue to "root.user".
> 2. The second mapping rule matches the same user ("test.user") and places the 
> application to the default queue.
> *Expactation:*
> When the user with username "root.user" submits a job, the application will 
> be placed to queue "root.user".
> *Observed behaviour:* 
> The application is placed to test_dot_user.
> This means that the dot is replaced to "{_}dot{_}" too early so that the 
> default queue is set incorrectly.
>  
> I have attached a patch file that demonstrates this behaviour with 2 new 
> testcases along with the logs of these testcases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11190) CS Mapping rule bug: User matcher does not work correctly for usernames with dot

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11190:
---

szilard-nemeth commented on code in PR #4471:
URL: https://github.com/apache/hadoop/pull/4471#discussion_r1065113707


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/CSMappingPlacementRule.java:
##
@@ -228,7 +228,11 @@ private VariableContext createVariableContext(
   ApplicationSubmissionContext asc, String user) {
 VariableContext vctx = new VariableContext();
 
-vctx.put("%user", cleanName(user));
+String cleanedName = cleanName(user);
+if (!user.equals(cleanedName)) {
+  vctx.putOriginal("%user", user);
+}
+vctx.put("%user", cleanedName);

Review Comment:
   Yeah, the whole point is that if we don't keep the originalName separately 
(e.g. test.user) then the VariableMatcher will try to match for test_dot_user 
instead) so subsequent mapping rule actions won't be applied.
   
   Just try this out by commenting out the code block you think is unnecessary, 
the test called 
TestCSMappingPlacementRule#testOriginalUserNameWithDotCanBeUsedInMatchExpression
 will fail immediately)





> CS Mapping rule bug: User matcher does not work correctly for usernames with 
> dot
> 
>
> Key: YARN-11190
> URL: https://issues.apache.org/jira/browse/YARN-11190
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: capacity scheduler
>Reporter: Szilard Nemeth
>Assignee: Szilard Nemeth
>Priority: Major
>  Labels: pull-request-available
> Attachments: testUserNameSetDefaultAndPlaceWith2Rules.log, 
> testUserNameSetDefaultAndPlaceWith2RulesUsernameReplacedWithDot.log, 
> testcases.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Given the following scenario, the placement engine does not work as expected.
> A user with a '.' (dot) inside his/her username submits a job.
> Let the username be "test.user"
> There are 2 mapping rules: 
> 1. The matcher matches the user with name "test.user" and has an associated 
> mapping rule action that sets the default queue to "root.user".
> 2. The second mapping rule matches the same user ("test.user") and places the 
> application to the default queue.
> *Expactation:*
> When the user with username "root.user" submits a job, the application will 
> be placed to queue "root.user".
> *Observed behaviour:* 
> The application is placed to test_dot_user.
> This means that the dot is replaced to "{_}dot{_}" too early so that the 
> default queue is set incorrectly.
>  
> I have attached a patch file that demonstrates this behaviour with 2 new 
> testcases along with the logs of these testcases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11216) Avoid unnecessary reconstruction of ConfigurationProperties

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11216:
---

hadoop-yetus commented on PR #4655:
URL: https://github.com/apache/hadoop/pull/4655#issuecomment-1376128025

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 47s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  
|
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 2 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +0 :ok: |  mvndep  |  15m  4s |  |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |  29m  6s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  25m 46s |  |  trunk passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  compile  |  22m  4s |  |  trunk passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  checkstyle  |   4m 12s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   2m 49s |  |  trunk passed  |
   | -1 :x: |  javadoc  |   1m  7s | 
[/branch-javadoc-hadoop-common-project_hadoop-common-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4655/12/artifact/out/branch-javadoc-hadoop-common-project_hadoop-common-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-common in trunk failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | -1 :x: |  javadoc  |   0m 55s | 
[/branch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4655/12/artifact/out/branch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-yarn-server-resourcemanager in trunk failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | +1 :green_heart: |  javadoc  |   1m 31s |  |  trunk passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   4m 52s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  24m 25s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 24s |  |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   1m 57s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  24m 24s |  |  the patch passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  javac  |  24m 24s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  21m 50s |  |  the patch passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  javac  |  21m 50s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   3m 54s | 
[/results-checkstyle-root.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4655/12/artifact/out/results-checkstyle-root.txt)
 |  root: The patch generated 8 new + 150 unchanged - 0 fixed = 158 total (was 
150)  |
   | +1 :green_heart: |  mvnsite  |   2m 44s |  |  the patch passed  |
   | -1 :x: |  javadoc  |   1m  0s | 
[/patch-javadoc-hadoop-common-project_hadoop-common-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4655/12/artifact/out/patch-javadoc-hadoop-common-project_hadoop-common-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-common in the patch failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | -1 :x: |  javadoc  |   0m 54s | 
[/patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4655/12/artifact/out/patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-yarn-server-resourcemanager in the patch failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | +1 :green_heart: |  javadoc  |   1m 31s |  |  the patch passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | 

[jira] [Commented] (YARN-8900) [Router] Federation: routing getContainers REST invocations transparently to multiple RMs

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-8900:
--

hadoop-yetus commented on PR #5260:
URL: https://github.com/apache/hadoop/pull/5260#issuecomment-1375971675

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 38s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  
|
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  38m 28s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   0m 36s |  |  trunk passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  compile  |   0m 32s |  |  trunk passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  checkstyle  |   0m 32s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   0m 36s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 39s |  |  trunk passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  javadoc  |   0m 29s |  |  trunk passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   1m  6s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  20m 17s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  20m 36s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 25s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 27s |  |  the patch passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  javac  |   0m 27s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 24s |  |  the patch passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  javac  |   0m 24s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 17s | 
[/results-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-router.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5260/7/artifact/out/results-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-router.txt)
 |  
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router: 
The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)  |
   | +1 :green_heart: |  mvnsite  |   0m 25s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 21s |  |  the patch passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  javadoc  |   0m 20s |  |  the patch passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   0m 54s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  19m 32s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |   0m 31s |  |  hadoop-yarn-server-router in 
the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 38s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   |  89m 39s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5260/7/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/5260 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux 1b4255f0a74e 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 
18:16:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 3b4f1bee5a981c0eb3e13314a3b9e742ac6d5eab |
   | Default Java | Private Build-1.8.0_352-8u352-ga-1~20.04-b08 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_352-8u352-ga-1~20.04-b08 |
   |  Test Results | 

[jira] [Commented] (YARN-11349) [Federation] Router Support DelegationToken With SQL

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11349:
---

hadoop-yetus commented on PR #5244:
URL: https://github.com/apache/hadoop/pull/5244#issuecomment-1375972357

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 37s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  1s |  |  detect-secrets was not available.  
|
   | +0 :ok: |  buf  |   0m  1s |  |  buf was not available.  |
   | +0 :ok: |  buf  |   0m  1s |  |  buf was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 5 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +0 :ok: |  mvndep  |  15m 12s |  |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |  25m 45s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  23m  7s |  |  trunk passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  compile  |  20m 32s |  |  trunk passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  checkstyle  |   3m 51s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   8m  5s |  |  trunk passed  |
   | -1 :x: |  javadoc  |   1m  0s | 
[/branch-javadoc-hadoop-common-project_hadoop-common-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5244/8/artifact/out/branch-javadoc-hadoop-common-project_hadoop-common-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-common in trunk failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | -1 :x: |  javadoc  |   2m  8s | 
[/branch-javadoc-hadoop-yarn-project_hadoop-yarn-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5244/8/artifact/out/branch-javadoc-hadoop-yarn-project_hadoop-yarn-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-yarn in trunk failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | +1 :green_heart: |  javadoc  |   4m 14s |  |  trunk passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |  16m 20s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  19m 46s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 28s |  |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   6m 33s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  22m 28s |  |  the patch passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  cc  |  22m 28s |  |  the patch passed  |
   | +1 :green_heart: |  javac  |  22m 28s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  20m 30s |  |  the patch passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  cc  |  20m 30s |  |  the patch passed  |
   | +1 :green_heart: |  javac  |  20m 30s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   3m 38s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   8m  4s |  |  the patch passed  |
   | -1 :x: |  javadoc  |   0m 53s | 
[/patch-javadoc-hadoop-common-project_hadoop-common-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5244/8/artifact/out/patch-javadoc-hadoop-common-project_hadoop-common-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-common in the patch failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | -1 :x: |  javadoc  |   2m 10s | 
[/patch-javadoc-hadoop-yarn-project_hadoop-yarn-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5244/8/artifact/out/patch-javadoc-hadoop-yarn-project_hadoop-yarn-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-yarn in the patch failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | +1 :green_heart: |  javadoc  |   4m 20s |  |  the patch passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |  17m  8s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  20m 18s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ 

[jira] [Commented] (YARN-6971) Clean up different ways to create resources

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-6971:
--

hadoop-yetus commented on PR #5113:
URL: https://github.com/apache/hadoop/pull/5113#issuecomment-1375967619

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m  0s |  |  Docker mode activated.  |
   | -1 :x: |  patch  |   0m 20s |  |  
https://github.com/apache/hadoop/pull/5113 does not apply to trunk. Rebase 
required? Wrong Branch? See 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.  
|
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | GITHUB PR | https://github.com/apache/hadoop/pull/5113 |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5113/10/console |
   | versions | git=2.17.1 |
   | Powered by | Apache Yetus 0.14.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   




> Clean up different ways to create resources
> ---
>
> Key: YARN-6971
> URL: https://issues.apache.org/jira/browse/YARN-6971
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: resourcemanager, scheduler
>Reporter: Yufei Gu
>Assignee: Riya Khandelwal
>Priority: Minor
>  Labels: newbie, pull-request-available
>
> There are several ways to create a {{resource}} object, e.g., 
> BuilderUtils.newResource() and Resources.createResource(). These methods not 
> only cause confusing but also performance issues, for example 
> BuilderUtils.newResource() is significant slow than 
> Resources.createResource(). 
> We could merge them some how, and replace most BuilderUtils.newResource() 
> with Resources.createResource().



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11190) CS Mapping rule bug: User matcher does not work correctly for usernames with dot

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11190:
---

brumi1024 commented on code in PR #4471:
URL: https://github.com/apache/hadoop/pull/4471#discussion_r1064710808


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/VariableContext.java:
##
@@ -149,6 +154,11 @@ public String get(String name) {
 String ret = variables.get(name);
 return ret == null ? "" : ret;
   }
+  
+  public String getOriginal(String name) {
+String ret = originalVariables.get(name);
+return ret;

Review Comment:
   Nit: just for the sake of symmetry this could be inlined, like the rest of 
the getters in this class.



##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/CSMappingPlacementRule.java:
##
@@ -228,7 +228,11 @@ private VariableContext createVariableContext(
   ApplicationSubmissionContext asc, String user) {
 VariableContext vctx = new VariableContext();
 
-vctx.put("%user", cleanName(user));
+String cleanedName = cleanName(user);
+if (!user.equals(cleanedName)) {
+  vctx.putOriginal("%user", user);
+}
+vctx.put("%user", cleanedName);

Review Comment:
   Nit: is this actually needed? cleanName returns the original name if it 
contains no dots, and it seems like the same logic is implemented here. 
Previous uses of cleanName also didn't create this logic separately.





> CS Mapping rule bug: User matcher does not work correctly for usernames with 
> dot
> 
>
> Key: YARN-11190
> URL: https://issues.apache.org/jira/browse/YARN-11190
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: capacity scheduler
>Reporter: Szilard Nemeth
>Assignee: Szilard Nemeth
>Priority: Major
>  Labels: pull-request-available
> Attachments: testUserNameSetDefaultAndPlaceWith2Rules.log, 
> testUserNameSetDefaultAndPlaceWith2RulesUsernameReplacedWithDot.log, 
> testcases.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Given the following scenario, the placement engine does not work as expected.
> A user with a '.' (dot) inside his/her username submits a job.
> Let the username be "test.user"
> There are 2 mapping rules: 
> 1. The matcher matches the user with name "test.user" and has an associated 
> mapping rule action that sets the default queue to "root.user".
> 2. The second mapping rule matches the same user ("test.user") and places the 
> application to the default queue.
> *Expactation:*
> When the user with username "root.user" submits a job, the application will 
> be placed to queue "root.user".
> *Observed behaviour:* 
> The application is placed to test_dot_user.
> This means that the dot is replaced to "{_}dot{_}" too early so that the 
> default queue is set incorrectly.
>  
> I have attached a patch file that demonstrates this behaviour with 2 new 
> testcases along with the logs of these testcases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-8900) [Router] Federation: routing getContainers REST invocations transparently to multiple RMs

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-8900:
--

slfan1989 commented on code in PR #5260:
URL: https://github.com/apache/hadoop/pull/5260#discussion_r1064709325


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/FederationInterceptorREST.java:
##
@@ -2512,36 +2513,41 @@ private  Map 
invokeConcurrent(Collection c
   getMethod(request.getMethodName(), request.getTypes());
   Object retObj = method.invoke(interceptor, request.getParams());
   R ret = clazz.cast(retObj);
-  return Pair.of(ret, null);
+  return Triple.of(info, ret, null);

Review Comment:
   Thank you very much for your suggestion, I will modify the code.





> [Router] Federation: routing getContainers REST invocations transparently to 
> multiple RMs
> -
>
> Key: YARN-8900
> URL: https://issues.apache.org/jira/browse/YARN-8900
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: federation, router
>Reporter: Giovanni Matteo Fumarola
>Assignee: Shilun Fan
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.4.0
>
> Attachments: YARN-8900.v1.patch, YARN-8900.v2.patch
>
>  Time Spent: 5h 50m
>  Remaining Estimate: 0h
>
> This JIRA tracks the design/implementation of the layer for routing 
> RMWebServicesProtocol requests to the appropriate RM(s) in a federated YARN 
> cluster.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Resolved] (YARN-6412) aux-services classpath not documented

2023-01-09 Thread Benjamin Teke (Jira)


 [ 
https://issues.apache.org/jira/browse/YARN-6412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Teke resolved YARN-6412.
-
Hadoop Flags: Reviewed
  Resolution: Fixed

> aux-services classpath not documented
> -
>
> Key: YARN-6412
> URL: https://issues.apache.org/jira/browse/YARN-6412
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Miklos Szegedi
>Assignee: Riya Khandelwal
>Priority: Minor
>  Labels: docuentation, newbie, pull-request-available
>
> YARN-4577 introduced two new configuration entries 
> yarn.nodemanager.aux-services.%s.classpath and 
> yarn.nodemanager.aux-services.%s.system-classes. These are not documented in 
> hadoop-yarn-common/.../yarn-default.xml



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-6412) aux-services classpath not documented

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-6412:
--

brumi1024 merged PR #5242:
URL: https://github.com/apache/hadoop/pull/5242




> aux-services classpath not documented
> -
>
> Key: YARN-6412
> URL: https://issues.apache.org/jira/browse/YARN-6412
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Miklos Szegedi
>Assignee: Riya Khandelwal
>Priority: Minor
>  Labels: docuentation, newbie, pull-request-available
>
> YARN-4577 introduced two new configuration entries 
> yarn.nodemanager.aux-services.%s.classpath and 
> yarn.nodemanager.aux-services.%s.system-classes. These are not documented in 
> hadoop-yarn-common/.../yarn-default.xml



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-6412) aux-services classpath not documented

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-6412:
--

brumi1024 commented on PR #5242:
URL: https://github.com/apache/hadoop/pull/5242#issuecomment-1375708962

   Thanks @riyakhdl latest patch LGTM. Merged to trunk.




> aux-services classpath not documented
> -
>
> Key: YARN-6412
> URL: https://issues.apache.org/jira/browse/YARN-6412
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Miklos Szegedi
>Assignee: Riya Khandelwal
>Priority: Minor
>  Labels: docuentation, newbie, pull-request-available
>
> YARN-4577 introduced two new configuration entries 
> yarn.nodemanager.aux-services.%s.classpath and 
> yarn.nodemanager.aux-services.%s.system-classes. These are not documented in 
> hadoop-yarn-common/.../yarn-default.xml



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11218) [Federation] Add getActivities, getBulkActivities REST APIs for Router

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11218:
---

hadoop-yetus commented on PR #5284:
URL: https://github.com/apache/hadoop/pull/5284#issuecomment-1375673222

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 34s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  
|
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 3 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +0 :ok: |  mvndep  |  16m 14s |  |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |  25m 53s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   3m 50s |  |  trunk passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  compile  |   3m 18s |  |  trunk passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  checkstyle  |   1m 14s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 37s |  |  trunk passed  |
   | -1 :x: |  javadoc  |   0m 57s | 
[/branch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5284/3/artifact/out/branch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-yarn-server-resourcemanager in trunk failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | +1 :green_heart: |  javadoc  |   1m 12s |  |  trunk passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   2m 59s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  19m 53s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 28s |  |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   1m 15s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m 42s |  |  the patch passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  javac  |   3m 42s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m 13s |  |  the patch passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  javac  |   3m 13s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   1m  3s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   1m 20s |  |  the patch passed  |
   | -1 :x: |  javadoc  |   0m 41s | 
[/patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5284/3/artifact/out/patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-yarn-server-resourcemanager in the patch failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | +1 :green_heart: |  javadoc  |   1m  1s |  |  the patch passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   2m 52s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  20m  6s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |  98m 50s |  |  
hadoop-yarn-server-resourcemanager in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 33s |  |  hadoop-yarn-server-router in 
the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 37s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 216m 10s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5284/3/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/5284 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux 5b317b4d3ad7 

[jira] [Commented] (YARN-11216) Avoid unnecessary reconstruction of ConfigurationProperties

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11216:
---

hadoop-yetus commented on PR #4655:
URL: https://github.com/apache/hadoop/pull/4655#issuecomment-1375672632

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m  0s |  |  Docker mode activated.  |
   | -1 :x: |  patch  |   0m 21s |  |  
https://github.com/apache/hadoop/pull/4655 does not apply to trunk. Rebase 
required? Wrong Branch? See 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.  
|
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | GITHUB PR | https://github.com/apache/hadoop/pull/4655 |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4655/14/console |
   | versions | git=2.17.1 |
   | Powered by | Apache Yetus 0.14.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   




> Avoid unnecessary reconstruction of ConfigurationProperties
> ---
>
> Key: YARN-11216
> URL: https://issues.apache.org/jira/browse/YARN-11216
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: capacity scheduler
>Reporter: András Győri
>Assignee: Bence Kosztolnik
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> ConfigurationProperties is expensive to create, however, due to its immutable 
> nature it is possible to copy it/share it between configuration objects (eg. 
> create a copy constructor). 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11216) Avoid unnecessary reconstruction of ConfigurationProperties

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11216:
---

hadoop-yetus commented on PR #4655:
URL: https://github.com/apache/hadoop/pull/4655#issuecomment-1375631201

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m  0s |  |  Docker mode activated.  |
   | -1 :x: |  patch  |   0m 21s |  |  
https://github.com/apache/hadoop/pull/4655 does not apply to trunk. Rebase 
required? Wrong Branch? See 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.  
|
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | GITHUB PR | https://github.com/apache/hadoop/pull/4655 |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4655/13/console |
   | versions | git=2.17.1 |
   | Powered by | Apache Yetus 0.14.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   




> Avoid unnecessary reconstruction of ConfigurationProperties
> ---
>
> Key: YARN-11216
> URL: https://issues.apache.org/jira/browse/YARN-11216
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: capacity scheduler
>Reporter: András Győri
>Assignee: Bence Kosztolnik
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> ConfigurationProperties is expensive to create, however, due to its immutable 
> nature it is possible to copy it/share it between configuration objects (eg. 
> create a copy constructor). 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11216) Avoid unnecessary reconstruction of ConfigurationProperties

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11216:
---

K0K0V0K commented on code in PR #4655:
URL: https://github.com/apache/hadoop/pull/4655#discussion_r1064638015


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestCapacitySchedulerConfiguration.java:
##
@@ -107,6 +110,40 @@ public void testDefaultSubmitACLForRootAllAllowed() {
 assertTrue(acl.isAllAllowed());
   }
 
+  /**
+   * dfs.nfs.exports.allowed.hosts
+   * prop is deprecated, now we use
+   * nfs.exports.allowed.hosts
+   * instead
+   */
+  @Test
+  public void testDeprecationFeatureWorks() {

Review Comment:
   When we set a deprecated properite, there is some logic under the hood what 
keeps the old value and add an alias to the properties object, and we have to 
ensure the alias add also present in the tree.
   
   The unset unfortunately not works fine, but i created a ticket for that
   https://issues.apache.org/jira/browse/YARN-11348





> Avoid unnecessary reconstruction of ConfigurationProperties
> ---
>
> Key: YARN-11216
> URL: https://issues.apache.org/jira/browse/YARN-11216
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: capacity scheduler
>Reporter: András Győri
>Assignee: Bence Kosztolnik
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> ConfigurationProperties is expensive to create, however, due to its immutable 
> nature it is possible to copy it/share it between configuration objects (eg. 
> create a copy constructor). 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11216) Avoid unnecessary reconstruction of ConfigurationProperties

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11216:
---

K0K0V0K commented on code in PR #4655:
URL: https://github.com/apache/hadoop/pull/4655#discussion_r1064630413


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ConfigurationProperties.java:
##
@@ -94,6 +108,42 @@ public Map getPropertiesWithPrefix(
 return properties;
   }
 
+  /**
+   * Update or create value in the nodes.
+   * @param name name of the property
+   * @param value value of the property
+   */
+  public void set(String name, String value) {
+PrefixNode node = getNode(name);

Review Comment:
   if the node is null, than the getNode will create a WARNING message
   ```
 /**
  * Finds the node that matches the whole key or create it, if it does not 
exist.
  * @param name name of the property
  * @return the found or created node, if the name is empty, than return 
with null
  */
 private PrefixNode getNode(String name) {
   List propertyKeyParts = splitPropertyByDelimiter(name);
   if (!propertyKeyParts.isEmpty()) {
 return findOrCreatePrefixNode(null, propertyKeyParts.iterator());
   } else {
 LOG.warn("Empty configuration property");
 return null;
   }
 }
   ```



##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ConfigurationProperties.java:
##
@@ -94,6 +108,42 @@ public Map getPropertiesWithPrefix(
 return properties;
   }
 
+  /**
+   * Update or create value in the nodes.
+   * @param name name of the property
+   * @param value value of the property
+   */
+  public void set(String name, String value) {
+PrefixNode node = getNode(name);
+if (node != null) {
+  node.getValues().put(name, value);
+}
+  }
+
+  /**
+   * Delete value from nodes.
+   * @param name name of the property
+   */
+  public void unset(String name) {
+PrefixNode node = getNode(name);
+if (node != null) {

Review Comment:
   if the node is null, than the getNode will create a WARNING message
   ```
 /**
  * Finds the node that matches the whole key or create it, if it does not 
exist.
  * @param name name of the property
  * @return the found or created node, if the name is empty, than return 
with null
  */
 private PrefixNode getNode(String name) {
   List propertyKeyParts = splitPropertyByDelimiter(name);
   if (!propertyKeyParts.isEmpty()) {
 return findOrCreatePrefixNode(null, propertyKeyParts.iterator());
   } else {
 LOG.warn("Empty configuration property");
 return null;
   }
 }
   ```





> Avoid unnecessary reconstruction of ConfigurationProperties
> ---
>
> Key: YARN-11216
> URL: https://issues.apache.org/jira/browse/YARN-11216
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: capacity scheduler
>Reporter: András Győri
>Assignee: Bence Kosztolnik
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> ConfigurationProperties is expensive to create, however, due to its immutable 
> nature it is possible to copy it/share it between configuration objects (eg. 
> create a copy constructor). 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11410) Add default methods for StateMachine

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11410:
---

brumi1024 commented on PR #5286:
URL: https://github.com/apache/hadoop/pull/5286#issuecomment-1375602754

   Thanks @K0K0V0K for the patch! Can you please take care of the checkstyle 
issues? I think you can disregard the redundant modifier issues, the rest 
should be a small fix.




> Add default methods for StateMachine
> 
>
> Key: YARN-11410
> URL: https://issues.apache.org/jira/browse/YARN-11410
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Bence Kosztolnik
>Assignee: Bence Kosztolnik
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.4.0
>
>
> YARN-11395 created a new method in the StateMachine interface, what can break 
> the compatibility with connected softwares, so the method should be converted 
> to default method, what can prevent this break



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (YARN-11320) [Federation] Add getSchedulerInfo REST APIs for Router

2023-01-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on YARN-11320:
---

hadoop-yetus commented on PR #5217:
URL: https://github.com/apache/hadoop/pull/5217#issuecomment-1375580643

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   1m 36s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  1s |  |  detect-secrets was not available.  
|
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 3 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +0 :ok: |  mvndep  |  15m 12s |  |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |  30m 10s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   4m 55s |  |  trunk passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  compile  |   3m 40s |  |  trunk passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  checkstyle  |   1m 17s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 34s |  |  trunk passed  |
   | -1 :x: |  javadoc  |   0m 54s | 
[/branch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5217/18/artifact/out/branch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-yarn-server-resourcemanager in trunk failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | +1 :green_heart: |  javadoc  |   1m 12s |  |  trunk passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   3m  6s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  24m 54s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  25m 19s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 30s |  |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   1m 27s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   4m 35s |  |  the patch passed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04  |
   | +1 :green_heart: |  javac  |   4m 35s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m 45s |  |  the patch passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  javac  |   3m 45s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   1m 16s | 
[/results-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5217/18/artifact/out/results-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server.txt)
 |  hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server: The patch generated 1 
new + 59 unchanged - 1 fixed = 60 total (was 60)  |
   | +1 :green_heart: |  mvnsite  |   1m 28s |  |  the patch passed  |
   | -1 :x: |  javadoc  |   0m 47s | 
[/patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5217/18/artifact/out/patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt)
 |  hadoop-yarn-server-resourcemanager in the patch failed with JDK 
Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.  |
   | +1 :green_heart: |  javadoc  |   1m  5s |  |  the patch passed with JDK 
Private Build-1.8.0_352-8u352-ga-1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   3m 31s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  26m 18s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  | 112m 36s |  |  
hadoop-yarn-server-resourcemanager in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 30s |  |  hadoop-yarn-server-router in 
the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 36s |  |  The patch does not 
generate