[jira] [Commented] (YARN-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-03 Thread ASF GitHub Bot (Jira)


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

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

slfan1989 commented on PR #5096:
URL: https://github.com/apache/hadoop/pull/5096#issuecomment-1302995043

   > LGTM after last commit
   
   @ashutoshcipher Thank you very much for your help reviewing the code!




> Improve equals, hashCode(), toString() methods of the Federation Base Object
> 
>
> Key: YARN-11366
> URL: https://issues.apache.org/jira/browse/YARN-11366
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: federation, router
>Affects Versions: 3.4.0
>Reporter: fanshilun
>Assignee: fanshilun
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.4.0
>
>
> Yarn Federation contains some basic objects, which are listed below:
> SubClusterId
> SubClusterIdInfo
> SubClusterInfo
> SubClusterPolicyConfiguration
> ApplicationHomeSubCluster
> ReservationHomeSubCluster
> RouterMasterKey
> RouterStoreToken
> The basic methods of these objects are not perfect, some lack equals, 
> hashCode(), and some lack toString(). This pr will improve this part of the 
> code.



--
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-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-03 Thread ASF GitHub Bot (Jira)


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

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

slfan1989 commented on PR #5096:
URL: https://github.com/apache/hadoop/pull/5096#issuecomment-1302994598

   @goiri Thank you very much for your help reviewing the code and merging the 
pr!




> Improve equals, hashCode(), toString() methods of the Federation Base Object
> 
>
> Key: YARN-11366
> URL: https://issues.apache.org/jira/browse/YARN-11366
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: federation, router
>Affects Versions: 3.4.0
>Reporter: fanshilun
>Assignee: fanshilun
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.4.0
>
>
> Yarn Federation contains some basic objects, which are listed below:
> SubClusterId
> SubClusterIdInfo
> SubClusterInfo
> SubClusterPolicyConfiguration
> ApplicationHomeSubCluster
> ReservationHomeSubCluster
> RouterMasterKey
> RouterStoreToken
> The basic methods of these objects are not perfect, some lack equals, 
> hashCode(), and some lack toString(). This pr will improve this part of the 
> code.



--
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-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-03 Thread ASF GitHub Bot (Jira)


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

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

goiri merged PR #5096:
URL: https://github.com/apache/hadoop/pull/5096




> Improve equals, hashCode(), toString() methods of the Federation Base Object
> 
>
> Key: YARN-11366
> URL: https://issues.apache.org/jira/browse/YARN-11366
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: federation, router
>Affects Versions: 3.4.0
>Reporter: fanshilun
>Assignee: fanshilun
>Priority: Major
>  Labels: pull-request-available
>
> Yarn Federation contains some basic objects, which are listed below:
> SubClusterId
> SubClusterIdInfo
> SubClusterInfo
> SubClusterPolicyConfiguration
> ApplicationHomeSubCluster
> ReservationHomeSubCluster
> RouterMasterKey
> RouterStoreToken
> The basic methods of these objects are not perfect, some lack equals, 
> hashCode(), and some lack toString(). This pr will improve this part of the 
> code.



--
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-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-03 Thread ASF GitHub Bot (Jira)


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

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

slfan1989 commented on PR #5096:
URL: https://github.com/apache/hadoop/pull/5096#issuecomment-1302704754

   @goiri Can you help review the code again? Thank you very much!




> Improve equals, hashCode(), toString() methods of the Federation Base Object
> 
>
> Key: YARN-11366
> URL: https://issues.apache.org/jira/browse/YARN-11366
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: federation, router
>Affects Versions: 3.4.0
>Reporter: fanshilun
>Assignee: fanshilun
>Priority: Major
>  Labels: pull-request-available
>
> Yarn Federation contains some basic objects, which are listed below:
> SubClusterId
> SubClusterIdInfo
> SubClusterInfo
> SubClusterPolicyConfiguration
> ApplicationHomeSubCluster
> ReservationHomeSubCluster
> RouterMasterKey
> RouterStoreToken
> The basic methods of these objects are not perfect, some lack equals, 
> hashCode(), and some lack toString(). This pr will improve this part of the 
> code.



--
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-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-03 Thread ASF GitHub Bot (Jira)


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

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

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

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 53s |  |  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 56s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   0m 51s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  compile  |   0m 43s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   0m 37s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   0m 49s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 52s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 39s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 43s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  24m 19s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 36s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 39s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javac  |   0m 39s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 35s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |   0m 35s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 20s |  |  
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common: 
The patch generated 0 new + 0 unchanged - 2 fixed = 0 total (was 2)  |
   | +1 :green_heart: |  mvnsite  |   0m 37s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 32s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 29s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 30s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  23m 38s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |   3m  4s |  |  hadoop-yarn-server-common in 
the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 39s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 106m 11s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/7/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/5096 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux 2e7032f0bf36 4.15.0-191-generic #202-Ubuntu SMP Thu Aug 4 
01:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 0d3c221d4625674a6b4b5ba7b470295f3f9735f3 |
   | Default Java | Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/7/testReport/ |
   | Max. process+thread count | 601 (vs. ulimit of 5500) |
   | modules | C: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common U: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/

[jira] [Commented] (YARN-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-02 Thread ASF GitHub Bot (Jira)


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

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

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

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 53s |  |  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 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  42m 11s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   0m 54s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  compile  |   0m 44s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   0m 38s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   0m 50s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 52s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 38s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 43s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  24m  9s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 35s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 39s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javac  |   0m 39s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 34s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |   0m 34s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 20s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   0m 36s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 32s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 29s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 31s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  23m 53s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |   3m  3s |  |  hadoop-yarn-server-common in 
the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 40s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 106m 29s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/6/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/5096 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux 2f2db7e88b06 4.15.0-191-generic #202-Ubuntu SMP Thu Aug 4 
01:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / b35d4a269d21012ae690f183461de19f5b1c84c1 |
   | Default Java | Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/6/testReport/ |
   | Max. process+thread count | 531 (vs. ulimit of 5500) |
   | modules | C: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common U: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/6/console |
   | versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
   | Powered by | Apache Yetus 0.14.0 https://yetus.apa

[jira] [Commented] (YARN-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-02 Thread ASF GitHub Bot (Jira)


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

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

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


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/records/ReservationHomeSubCluster.java:
##
@@ -94,20 +94,20 @@ public static ReservationHomeSubCluster 
newInstance(ReservationId resId,
 
   @Override
   public boolean equals(Object obj) {
+
 if (this == obj) {
   return true;
 }
-if (obj == null) {
-  return false;
-}
-if (getClass() != obj.getClass()) {
+
+if (obj == null || getClass() != obj.getClass()) {
   return false;
 }
-ReservationHomeSubCluster other = (ReservationHomeSubCluster) obj;
+
+ReservationHomeSubCluster right = (ReservationHomeSubCluster) obj;
 
 return new EqualsBuilder()
-.append(this.getReservationId(), other.getReservationId())
-.append(this.getHomeSubCluster(), other.getHomeSubCluster())
+.append(this.getReservationId(), right.getReservationId())

Review Comment:
   I will fix it





> Improve equals, hashCode(), toString() methods of the Federation Base Object
> 
>
> Key: YARN-11366
> URL: https://issues.apache.org/jira/browse/YARN-11366
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: federation, router
>Affects Versions: 3.4.0
>Reporter: fanshilun
>Assignee: fanshilun
>Priority: Major
>  Labels: pull-request-available
>
> Yarn Federation contains some basic objects, which are listed below:
> SubClusterId
> SubClusterIdInfo
> SubClusterInfo
> SubClusterPolicyConfiguration
> ApplicationHomeSubCluster
> ReservationHomeSubCluster
> RouterMasterKey
> RouterStoreToken
> The basic methods of these objects are not perfect, some lack equals, 
> hashCode(), and some lack toString(). This pr will improve this part of the 
> code.



--
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-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-02 Thread ASF GitHub Bot (Jira)


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

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

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


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/records/ApplicationHomeSubCluster.java:
##
@@ -123,32 +125,35 @@ public static ApplicationHomeSubCluster 
newInstance(ApplicationId appId, long cr
 
   @Override
   public boolean equals(Object obj) {
+
 if (this == obj) {
   return true;
 }
-if (obj == null) {
-  return false;
-}
-if (getClass() != obj.getClass()) {
-  return false;
-}
-ApplicationHomeSubCluster other = (ApplicationHomeSubCluster) obj;
-if (!this.getApplicationId().equals(other.getApplicationId())) {
+
+if (obj == null || getClass() != obj.getClass()) {

Review Comment:
   Thanks for your suggestion, I will fix it.





> Improve equals, hashCode(), toString() methods of the Federation Base Object
> 
>
> Key: YARN-11366
> URL: https://issues.apache.org/jira/browse/YARN-11366
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: federation, router
>Affects Versions: 3.4.0
>Reporter: fanshilun
>Assignee: fanshilun
>Priority: Major
>  Labels: pull-request-available
>
> Yarn Federation contains some basic objects, which are listed below:
> SubClusterId
> SubClusterIdInfo
> SubClusterInfo
> SubClusterPolicyConfiguration
> ApplicationHomeSubCluster
> ReservationHomeSubCluster
> RouterMasterKey
> RouterStoreToken
> The basic methods of these objects are not perfect, some lack equals, 
> hashCode(), and some lack toString(). This pr will improve this part of the 
> code.



--
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-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-02 Thread ASF GitHub Bot (Jira)


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

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

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


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/records/RouterMasterKey.java:
##
@@ -130,4 +130,10 @@ public boolean equals(Object right) {
 .append(getKeyBytes().array(), r.getKeyBytes())
 .isEquals();
   }
+
+  @Override
+  public String toString() {
+return "RouterMasterKey [keyId = " + getKeyId()

Review Comment:
   Thank you very much for your help to review the code, I will use 
`StringBuilder` to refactor this part of the code.





> Improve equals, hashCode(), toString() methods of the Federation Base Object
> 
>
> Key: YARN-11366
> URL: https://issues.apache.org/jira/browse/YARN-11366
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: federation, router
>Affects Versions: 3.4.0
>Reporter: fanshilun
>Assignee: fanshilun
>Priority: Major
>  Labels: pull-request-available
>
> Yarn Federation contains some basic objects, which are listed below:
> SubClusterId
> SubClusterIdInfo
> SubClusterInfo
> SubClusterPolicyConfiguration
> ApplicationHomeSubCluster
> ReservationHomeSubCluster
> RouterMasterKey
> RouterStoreToken
> The basic methods of these objects are not perfect, some lack equals, 
> hashCode(), and some lack toString(). This pr will improve this part of the 
> code.



--
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-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-02 Thread ASF GitHub Bot (Jira)


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

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

goiri commented on code in PR #5096:
URL: https://github.com/apache/hadoop/pull/5096#discussion_r1012244149


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/records/ReservationHomeSubCluster.java:
##
@@ -94,20 +94,20 @@ public static ReservationHomeSubCluster 
newInstance(ReservationId resId,
 
   @Override
   public boolean equals(Object obj) {
+
 if (this == obj) {
   return true;
 }
-if (obj == null) {
-  return false;
-}
-if (getClass() != obj.getClass()) {
+
+if (obj == null || getClass() != obj.getClass()) {
   return false;
 }
-ReservationHomeSubCluster other = (ReservationHomeSubCluster) obj;
+
+ReservationHomeSubCluster right = (ReservationHomeSubCluster) obj;
 
 return new EqualsBuilder()
-.append(this.getReservationId(), other.getReservationId())
-.append(this.getHomeSubCluster(), other.getHomeSubCluster())
+.append(this.getReservationId(), right.getReservationId())

Review Comment:
   The other terminology was good I'd say.



##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/records/ApplicationHomeSubCluster.java:
##
@@ -123,32 +125,35 @@ public static ApplicationHomeSubCluster 
newInstance(ApplicationId appId, long cr
 
   @Override
   public boolean equals(Object obj) {
+
 if (this == obj) {
   return true;
 }
-if (obj == null) {
-  return false;
-}
-if (getClass() != obj.getClass()) {
-  return false;
-}
-ApplicationHomeSubCluster other = (ApplicationHomeSubCluster) obj;
-if (!this.getApplicationId().equals(other.getApplicationId())) {
+
+if (obj == null || getClass() != obj.getClass()) {

Review Comment:
   Most other classes use instanceof



##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/records/RouterMasterKey.java:
##
@@ -130,4 +130,10 @@ public boolean equals(Object right) {
 .append(getKeyBytes().array(), r.getKeyBytes())
 .isEquals();
   }
+
+  @Override
+  public String toString() {
+return "RouterMasterKey [keyId = " + getKeyId()

Review Comment:
   StringBuilder might be better for this.





> Improve equals, hashCode(), toString() methods of the Federation Base Object
> 
>
> Key: YARN-11366
> URL: https://issues.apache.org/jira/browse/YARN-11366
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: federation, router
>Affects Versions: 3.4.0
>Reporter: fanshilun
>Assignee: fanshilun
>Priority: Major
>  Labels: pull-request-available
>
> Yarn Federation contains some basic objects, which are listed below:
> SubClusterId
> SubClusterIdInfo
> SubClusterInfo
> SubClusterPolicyConfiguration
> ApplicationHomeSubCluster
> ReservationHomeSubCluster
> RouterMasterKey
> RouterStoreToken
> The basic methods of these objects are not perfect, some lack equals, 
> hashCode(), and some lack toString(). This pr will improve this part of the 
> code.



--
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-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-02 Thread ASF GitHub Bot (Jira)


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

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

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

   :confetti_ball: **+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  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 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  41m 46s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   0m 52s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  compile  |   0m 46s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   0m 37s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   0m 51s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 52s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 37s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 41s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  23m 55s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 35s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 39s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javac  |   0m 39s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 34s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |   0m 34s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 20s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   0m 36s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 31s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 29s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 30s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  23m 57s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |   3m  3s |  |  hadoop-yarn-server-common in 
the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 38s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 105m 47s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/5/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/5096 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux dd716159edaa 4.15.0-191-generic #202-Ubuntu SMP Thu Aug 4 
01:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / b74ef85afcd49e73d904378423ee49ab8a729074 |
   | Default Java | Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/5/testReport/ |
   | Max. process+thread count | 529 (vs. ulimit of 5500) |
   | modules | C: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common U: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/5/console |
   | versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
   | Powered by | Apache Yetus 0.14.0 https://yetus.apa

[jira] [Commented] (YARN-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-02 Thread ASF GitHub Bot (Jira)


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

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

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


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/records/SubClusterPolicyConfiguration.java:
##
@@ -127,36 +129,36 @@ public static SubClusterPolicyConfiguration newInstance(
 
   @Override
   public int hashCode() {
-return 31 * getParams().hashCode() + getType().hashCode();
+return new HashCodeBuilder().
+append(this.getType()).
+append(this.getQueue()).
+append(this.getParams()).
+toHashCode();
   }
 
   @Override
   public boolean equals(Object obj) {
+
 if (this == obj) {
   return true;
 }
-if (obj == null) {
-  return false;
-}
-if (getClass() != obj.getClass()) {
-  return false;
-}
-SubClusterPolicyConfiguration other = (SubClusterPolicyConfiguration) obj;
-if (!this.getType().equals(other.getType())) {
-  return false;
-}
-if (!this.getParams().equals(other.getParams())) {
+
+if (obj == null || getClass() != obj.getClass()) {
   return false;
 }
-return true;
+
+SubClusterPolicyConfiguration right = (SubClusterPolicyConfiguration) obj;
+
+return new EqualsBuilder()
+.append(this.getType(), right.getType())
+.append(this.getQueue(), right.getQueue())
+.append(this.getParams(), right.getParams())
+.isEquals();
   }
 
   @Override
   public String toString() {
-StringBuilder sb = new StringBuilder();
-sb.append(getType())
-.append(" : ")
-.append(getParams());
-return sb.toString();
+return "SubClusterPolicyConfiguration [getType() = " + getType() + ","
++ "getQueue() = " + getQueue() + ",getParams() = " +  getParams() + 
"]";
   }
 }

Review Comment:
   Thank you very much for your help reviewing the code, I will fix it.



##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/store/records/TestFederationProtocolRecords.java:
##
@@ -326,4 +333,71 @@ public void testGetReservationHomeSubClusterRequest() 
throws Exception {
 validatePBImplRecord(GetReservationHomeSubClusterRequestPBImpl.class,
 GetReservationHomeSubClusterRequestProto.class);
   }
+
+  @Test
+  public void testValidateApplicationHomeSubClusterEqual() throws Exception {
+long now = Time.now();
+
+ApplicationId appId1 = ApplicationId.newInstance(now, 1);
+SubClusterId subClusterId1 = SubClusterId.newInstance("SC-1");
+ApplicationHomeSubCluster applicationHomeSubCluster1 =
+ApplicationHomeSubCluster.newInstance(appId1, subClusterId1);
+
+ApplicationId appId2 = ApplicationId.newInstance(now, 1);
+SubClusterId subClusterId2 = SubClusterId.newInstance("SC-1");
+ApplicationHomeSubCluster applicationHomeSubCluster2 =
+ApplicationHomeSubCluster.newInstance(appId2, subClusterId2);
+
+assertEquals(applicationHomeSubCluster1, applicationHomeSubCluster2);
+  }
+
+  @Test
+  public void testValidateReservationHomeSubClusterEqual() throws Exception {
+long now = Time.now();
+
+ReservationId reservationId1 = ReservationId.newInstance(now, 1);
+SubClusterId subClusterId1 = SubClusterId.newInstance("SC-1");
+ReservationHomeSubCluster reservationHomeSubCluster1 =
+ReservationHomeSubCluster.newInstance(reservationId1, subClusterId1);
+
+ReservationId reservationId2 = ReservationId.newInstance(now, 1);
+SubClusterId subClusterId2 = SubClusterId.newInstance("SC-1");
+ReservationHomeSubCluster reservationHomeSubCluster2 =
+ReservationHomeSubCluster.newInstance(reservationId2, subClusterId2);
+
+assertEquals(reservationHomeSubCluster1, reservationHomeSubCluster2);
+  }
+
+  @Test
+  public void testSubClusterIdEqual() throws Exception {
+SubClusterId subClusterId1 = SubClusterId.newInstance("SC-1");
+SubClusterId subClusterId2 = SubClusterId.newInstance("SC-1");
+assertEquals(subClusterId1, subClusterId2);
+  }
+
+  @Test
+  public void testSubClusterIdInfoEqual() throws Exception {
+SubClusterIdInfo subClusterIdInfo1 = new SubClusterIdInfo("SC-1");
+SubClusterIdInfo subClusterIdInfo2 = new SubClusterIdInfo("SC-1");
+assertEquals(subClusterIdInfo1, subClusterIdInfo2);
+  }
+
+  @Test
+  public void testSubClusterPolicyConfiguration() throws Exception {
+
+String queue1 = "queue1";
+WeightedPolicyInfo policyInfo1 = mock(WeightedPolicyInfo.class);
+ByteBuffer buf1 = policyInfo1.toByteBuffer();
+SubClusterPolicyConfiguration configuration1 = 
SubClusterPolicyCon

[jira] [Commented] (YARN-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-01 Thread ASF GitHub Bot (Jira)


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

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

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

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 48s |  |  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 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  42m 13s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   0m 51s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  compile  |   0m 45s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   0m 37s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   0m 48s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 52s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 37s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 41s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  23m 54s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 36s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 41s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javac  |   0m 41s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 34s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |   0m 34s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  1s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 20s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   0m 37s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 31s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 27s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 31s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  24m  6s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |   3m  5s |  |  hadoop-yarn-server-common in 
the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 39s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 106m 21s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/4/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/5096 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux 6da11703b09b 4.15.0-191-generic #202-Ubuntu SMP Thu Aug 4 
01:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / f32bbbe6e3f3cb43d90e40c0cb3ef81a87932bd5 |
   | Default Java | Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/4/testReport/ |
   | Max. process+thread count | 601 (vs. ulimit of 5500) |
   | modules | C: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common U: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/4/console |
   | versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
   | Powered by | Apache Yetus 0.14.0 https://yetus.apa

[jira] [Commented] (YARN-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-01 Thread ASF GitHub Bot (Jira)


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

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

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

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 54s |  |  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  |  42m 16s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   0m 54s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  compile  |   0m 43s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   0m 39s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   0m 48s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 51s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 38s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 43s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  24m 24s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 36s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 40s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javac  |   0m 40s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 34s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |   0m 34s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 20s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   0m 37s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 31s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 29s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 30s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  23m 56s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | -1 :x: |  unit  |   3m  6s | 
[/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/3/artifact/out/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-common.txt)
 |  hadoop-yarn-server-common in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 41s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 107m 16s |  |  |
   
   
   | Reason | Tests |
   |---:|:--|
   | Failed junit tests | 
hadoop.yarn.server.federation.store.impl.TestZookeeperFederationStateStore |
   |   | hadoop.yarn.server.federation.store.impl.TestSQLFederationStateStore |
   |   | 
hadoop.yarn.server.federation.store.impl.TestMemoryFederationStateStore |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/3/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/5096 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux 2a4c36587d7b 4.15.0-191-generic #202-Ubuntu SMP Thu Aug 4 
01:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 2bf1ed0e2faa642c332da6c4dd50ab7dcbfa3733 |
   | Default Java | Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_342-8u342-

[jira] [Commented] (YARN-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-01 Thread ASF GitHub Bot (Jira)


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

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

ashutoshcipher commented on code in PR #5096:
URL: https://github.com/apache/hadoop/pull/5096#discussion_r1011021584


##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/store/records/TestFederationProtocolRecords.java:
##
@@ -326,4 +333,71 @@ public void testGetReservationHomeSubClusterRequest() 
throws Exception {
 validatePBImplRecord(GetReservationHomeSubClusterRequestPBImpl.class,
 GetReservationHomeSubClusterRequestProto.class);
   }
+
+  @Test
+  public void testValidateApplicationHomeSubClusterEqual() throws Exception {
+long now = Time.now();
+
+ApplicationId appId1 = ApplicationId.newInstance(now, 1);
+SubClusterId subClusterId1 = SubClusterId.newInstance("SC-1");
+ApplicationHomeSubCluster applicationHomeSubCluster1 =
+ApplicationHomeSubCluster.newInstance(appId1, subClusterId1);
+
+ApplicationId appId2 = ApplicationId.newInstance(now, 1);
+SubClusterId subClusterId2 = SubClusterId.newInstance("SC-1");
+ApplicationHomeSubCluster applicationHomeSubCluster2 =
+ApplicationHomeSubCluster.newInstance(appId2, subClusterId2);
+
+assertEquals(applicationHomeSubCluster1, applicationHomeSubCluster2);
+  }
+
+  @Test
+  public void testValidateReservationHomeSubClusterEqual() throws Exception {
+long now = Time.now();
+
+ReservationId reservationId1 = ReservationId.newInstance(now, 1);
+SubClusterId subClusterId1 = SubClusterId.newInstance("SC-1");
+ReservationHomeSubCluster reservationHomeSubCluster1 =
+ReservationHomeSubCluster.newInstance(reservationId1, subClusterId1);
+
+ReservationId reservationId2 = ReservationId.newInstance(now, 1);
+SubClusterId subClusterId2 = SubClusterId.newInstance("SC-1");
+ReservationHomeSubCluster reservationHomeSubCluster2 =
+ReservationHomeSubCluster.newInstance(reservationId2, subClusterId2);
+
+assertEquals(reservationHomeSubCluster1, reservationHomeSubCluster2);
+  }
+
+  @Test
+  public void testSubClusterIdEqual() throws Exception {
+SubClusterId subClusterId1 = SubClusterId.newInstance("SC-1");
+SubClusterId subClusterId2 = SubClusterId.newInstance("SC-1");
+assertEquals(subClusterId1, subClusterId2);
+  }
+
+  @Test
+  public void testSubClusterIdInfoEqual() throws Exception {
+SubClusterIdInfo subClusterIdInfo1 = new SubClusterIdInfo("SC-1");
+SubClusterIdInfo subClusterIdInfo2 = new SubClusterIdInfo("SC-1");
+assertEquals(subClusterIdInfo1, subClusterIdInfo2);
+  }
+
+  @Test
+  public void testSubClusterPolicyConfiguration() throws Exception {
+
+String queue1 = "queue1";
+WeightedPolicyInfo policyInfo1 = mock(WeightedPolicyInfo.class);
+ByteBuffer buf1 = policyInfo1.toByteBuffer();
+SubClusterPolicyConfiguration configuration1 = 
SubClusterPolicyConfiguration
+.newInstance(queue1, policyInfo1.getClass().getCanonicalName(), buf1);
+
+String queue2 = "queue1";
+WeightedPolicyInfo policyInfo2 = mock(WeightedPolicyInfo.class);
+ByteBuffer buf2 = policyInfo1.toByteBuffer();
+SubClusterPolicyConfiguration configuration2 = 
SubClusterPolicyConfiguration
+.newInstance(queue2, policyInfo2.getClass().getCanonicalName(), buf2);
+
+assertEquals(configuration1, configuration2);
+  }
+
 }

Review Comment:
   No new line at end of file.



##
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/records/SubClusterPolicyConfiguration.java:
##
@@ -127,36 +129,36 @@ public static SubClusterPolicyConfiguration newInstance(
 
   @Override
   public int hashCode() {
-return 31 * getParams().hashCode() + getType().hashCode();
+return new HashCodeBuilder().
+append(this.getType()).
+append(this.getQueue()).
+append(this.getParams()).
+toHashCode();
   }
 
   @Override
   public boolean equals(Object obj) {
+
 if (this == obj) {
   return true;
 }
-if (obj == null) {
-  return false;
-}
-if (getClass() != obj.getClass()) {
-  return false;
-}
-SubClusterPolicyConfiguration other = (SubClusterPolicyConfiguration) obj;
-if (!this.getType().equals(other.getType())) {
-  return false;
-}
-if (!this.getParams().equals(other.getParams())) {
+
+if (obj == null || getClass() != obj.getClass()) {
   return false;
 }
-return true;
+
+SubClusterPolicyConfiguration right = (SubClusterPolicyConfiguration) obj;
+
+return new EqualsBuilder()
+.append(this.getType(), right.getType())
+.append(this.getQueue(), right.getQueue())
+.a

[jira] [Commented] (YARN-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-11-01 Thread ASF GitHub Bot (Jira)


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

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

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

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 50s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  1s |  |  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 :x: |  test4tests  |   0m  0s |  |  The patch doesn't appear to include 
any new or modified tests. Please justify why no new tests are needed for this 
patch. Also please list what manual steps were performed to verify this patch.  
|
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  41m 25s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   0m 50s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  compile  |   0m 43s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   0m 37s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   0m 49s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 52s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 39s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 41s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  24m 15s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 36s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 40s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javac  |   0m 40s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 34s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |   0m 34s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 19s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   0m 37s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 32s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 29s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 31s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  23m 46s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | -1 :x: |  unit  |   3m  6s | 
[/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/2/artifact/out/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-common.txt)
 |  hadoop-yarn-server-common in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 40s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 106m  1s |  |  |
   
   
   | Reason | Tests |
   |---:|:--|
   | Failed junit tests | 
hadoop.yarn.server.federation.store.impl.TestZookeeperFederationStateStore |
   |   | hadoop.yarn.server.federation.store.impl.TestSQLFederationStateStore |
   |   | 
hadoop.yarn.server.federation.store.impl.TestMemoryFederationStateStore |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/2/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/5096 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux 4a582d64ba05 4.15.0-191-generic #202-Ubuntu SMP Thu Aug 4 
01:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / fd9901cef2331621efd6a0b16f801017ed30f6bb |
   | Default Java | Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java

[jira] [Commented] (YARN-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-10-31 Thread ASF GitHub Bot (Jira)


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

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

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

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 51s |  |  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 :x: |  test4tests  |   0m  0s |  |  The patch doesn't appear to include 
any new or modified tests. Please justify why no new tests are needed for this 
patch. Also please list what manual steps were performed to verify this patch.  
|
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  41m 32s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   0m 50s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  compile  |   0m 45s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   0m 36s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   0m 51s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 51s |  |  trunk passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 38s |  |  trunk passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 42s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  23m 47s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 35s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 41s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javac  |   0m 41s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 33s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |   0m 33s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  1s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 19s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   0m 37s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 32s |  |  the patch passed with JDK 
Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 28s |  |  the patch passed with JDK 
Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   1m 28s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  23m 49s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |   3m  1s |  |  hadoop-yarn-server-common in 
the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 40s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 105m 40s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/1/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/5096 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux 7db8f47395a3 4.15.0-191-generic #202-Ubuntu SMP Thu Aug 4 
01:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 3b96acd8e92ab768fd5a5e72116f3e5c5026e459 |
   | Default Java | Private Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.16+8-post-Ubuntu-0ubuntu120.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_342-8u342-b07-0ubuntu1~20.04-b07 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5096/1/testReport/ |
   | Max. process+thread count | 605 (vs. ulimit of 5500) |
   | modules | C: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common U: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-50

[jira] [Commented] (YARN-11366) Improve equals, hashCode(), toString() methods of the Federation Base Object

2022-10-31 Thread ASF GitHub Bot (Jira)


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

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

slfan1989 opened a new pull request, #5096:
URL: https://github.com/apache/hadoop/pull/5096

   JIRA: YARN-11366.  Improve equals, hashCode(), toString() methods of the 
Federation Base Object.




> Improve equals, hashCode(), toString() methods of the Federation Base Object
> 
>
> Key: YARN-11366
> URL: https://issues.apache.org/jira/browse/YARN-11366
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: federation, router
>Affects Versions: 3.4.0
>Reporter: fanshilun
>Assignee: fanshilun
>Priority: Major
>
> Yarn Federation contains some basic objects, which are listed below:
> SubClusterId
> SubClusterIdInfo
> SubClusterInfo
> SubClusterPolicyConfiguration
> ApplicationHomeSubCluster
> ReservationHomeSubCluster
> RouterMasterKey
> RouterStoreToken
> The basic methods of these objects are not perfect, some lack equals, 
> hashCode(), and some lack toString(). This pr will improve this part of the 
> code.



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