You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "xiaojunxiang2023 (via GitHub)" <gi...@apache.org> on 2023/10/02 00:35:00 UTC
[GitHub] [hadoop] xiaojunxiang2023 opened a new pull request, #6135: RBF: The Quata class's andByStorageType method res has an incorrect initial value.
xiaojunxiang2023 opened a new pull request, #6135:
URL: https://github.com/apache/hadoop/pull/6135
The Quata class's andByStorageType method is intended to apply bitwise and to each bit of StorageType.values( ) (the converted value), returning true only if all the values are true.
So the initial value of res should be true and then loop through the array to perform the bitwise and operation.
However, since res starts with fasle, the bitwise and always evaluates to false, so we should fix res to start with true.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quata class's andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "xiaojunxiang2023 (via GitHub)" <gi...@apache.org>.
xiaojunxiang2023 commented on PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#issuecomment-1742938696
I think this (andByStorageType method) may be a bug, please help to check it. @ayushtkn
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quota class' andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "xiaojunxiang2023 (via GitHub)" <gi...@apache.org>.
xiaojunxiang2023 commented on code in PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#discussion_r1343269884
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterQuota.java:
##########
@@ -1168,6 +1170,32 @@ public void testQuotaUpdateWhenDestinationNotPresent() throws Exception {
assertEquals(0, quotaUsage.getSpaceConsumed());
}
+ @Test
+ public void testAndByStorageType() {
+ long[] typeQuota = new long[StorageType.values().length];
+ Arrays.fill(typeQuota, HdfsConstants.QUOTA_DONT_SET);
+
+ Predicate<StorageType> predicate = new Predicate<StorageType>() {
+ @Override
+ public boolean test(StorageType storageType) {
+ return typeQuota[storageType.ordinal()] == HdfsConstants.QUOTA_DONT_SET;
+ }
+ };
+
+ assertTrue(Quota.andByStorageType(predicate));
+
+ typeQuota[0] = 2023;
+ assertFalse(Quota.andByStorageType(predicate));
+
+ Arrays.fill(typeQuota, HdfsConstants.QUOTA_DONT_SET);
+ typeQuota[1] = 2023;
+ assertFalse(Quota.andByStorageType(predicate));
+
+ Arrays.fill(typeQuota, HdfsConstants.QUOTA_DONT_SET);
+ typeQuota[typeQuota.length-1] = 2023;
+ assertFalse(Quota.andByStorageType(predicate));
Review Comment:
Ok, I've fixed it and added some necessary comments and I'm waiting for it to be recompiled, please review it later

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quota class' andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#issuecomment-1744335005
LGTM +1.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quota class' andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "xiaojunxiang2023 (via GitHub)" <gi...@apache.org>.
xiaojunxiang2023 commented on PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#issuecomment-1745363197
Okay, I understand what you mean. Thank you for your suggestion. But in my country, it is indeed named according to this rule, and if it is not particularly necessary to modify it, I will keep it as it is.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
[GitHub] [hadoop] hadoop-yetus commented on pull request #6135: HDFS-17214. RBF: The Quata class's andByStorageType method res has an incorrect initial value.
Posted by "hadoop-yetus (via GitHub)" <gi...@apache.org>.
hadoop-yetus commented on PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#issuecomment-1742353028
:broken_heart: **-1 overall**
| Vote | Subsystem | Runtime | Logfile | Comment |
|:----:|----------:|--------:|:--------:|:-------:|
| +0 :ok: | reexec | 17m 55s | | 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 | 45m 35s | | trunk passed |
| +1 :green_heart: | compile | 0m 46s | | trunk passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 |
| +1 :green_heart: | compile | 0m 42s | | trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| +1 :green_heart: | checkstyle | 0m 35s | | trunk passed |
| +1 :green_heart: | mvnsite | 0m 48s | | trunk passed |
| +1 :green_heart: | javadoc | 0m 48s | | trunk passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 |
| +1 :green_heart: | javadoc | 0m 37s | | trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| +1 :green_heart: | spotbugs | 1m 27s | | trunk passed |
| +1 :green_heart: | shadedclient | 34m 2s | | branch has no errors when building and testing our client artifacts. |
|||| _ Patch Compile Tests _ |
| +1 :green_heart: | mvninstall | 0m 34s | | the patch passed |
| +1 :green_heart: | compile | 0m 35s | | the patch passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 |
| +1 :green_heart: | javac | 0m 35s | | the patch passed |
| +1 :green_heart: | compile | 0m 32s | | the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| +1 :green_heart: | javac | 0m 32s | | the patch passed |
| -1 :x: | blanks | 0m 0s | [/blanks-eol.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6135/1/artifact/out/blanks-eol.txt) | The patch has 2 line(s) that end in blanks. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply |
| +1 :green_heart: | checkstyle | 0m 20s | | the patch passed |
| +1 :green_heart: | mvnsite | 0m 33s | | the patch passed |
| +1 :green_heart: | javadoc | 0m 29s | | the patch passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 |
| +1 :green_heart: | javadoc | 0m 26s | | the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| +1 :green_heart: | spotbugs | 1m 21s | | the patch passed |
| +1 :green_heart: | shadedclient | 34m 4s | | patch has no errors when building and testing our client artifacts. |
|||| _ Other Tests _ |
| +1 :green_heart: | unit | 23m 0s | | hadoop-hdfs-rbf in the patch passed. |
| +1 :green_heart: | asflicense | 0m 41s | | The patch does not generate ASF License warnings. |
| | | 170m 46s | | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6135/1/artifact/out/Dockerfile |
| GITHUB PR | https://github.com/apache/hadoop/pull/6135 |
| Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
| uname | Linux 9f2ba51cd6b1 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/bin/hadoop.sh |
| git revision | trunk / f88e040dfcfafe1b065e84f6d1d449d895b5252a |
| Default Java | Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| Multi-JDK versions | /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6135/1/testReport/ |
| Max. process+thread count | 2326 (vs. ulimit of 5500) |
| modules | C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf |
| Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6135/1/console |
| versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.14.0 https://yetus.apache.org |
This message was automatically generated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quota class' andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "xiaojunxiang2023 (via GitHub)" <gi...@apache.org>.
xiaojunxiang2023 commented on PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#issuecomment-1745231983
Thank you for your support.
The id of xiaojunxiang is occupied by others, so I can only use xiaojunxiang2023,haha
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quota class' andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "hadoop-yetus (via GitHub)" <gi...@apache.org>.
hadoop-yetus commented on PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#issuecomment-1744070895
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Logfile | Comment |
|:----:|----------:|--------:|:--------:|:-------:|
| +0 :ok: | reexec | 0m 56s | | 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 | 45m 3s | | trunk passed |
| +1 :green_heart: | compile | 0m 45s | | trunk passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 |
| +1 :green_heart: | compile | 0m 42s | | trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| +1 :green_heart: | checkstyle | 0m 35s | | trunk passed |
| +1 :green_heart: | mvnsite | 0m 46s | | trunk passed |
| +1 :green_heart: | javadoc | 0m 45s | | trunk passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 |
| +1 :green_heart: | javadoc | 0m 37s | | trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| +1 :green_heart: | spotbugs | 1m 28s | | trunk passed |
| +1 :green_heart: | shadedclient | 34m 26s | | branch has no errors when building and testing our client artifacts. |
|||| _ Patch Compile Tests _ |
| +1 :green_heart: | mvninstall | 0m 34s | | the patch passed |
| +1 :green_heart: | compile | 0m 34s | | the patch passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 |
| +1 :green_heart: | javac | 0m 34s | | the patch passed |
| +1 :green_heart: | compile | 0m 31s | | the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| +1 :green_heart: | javac | 0m 31s | | 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 34s | | the patch passed |
| +1 :green_heart: | javadoc | 0m 30s | | the patch passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 |
| +1 :green_heart: | javadoc | 0m 26s | | the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| +1 :green_heart: | spotbugs | 1m 25s | | the patch passed |
| +1 :green_heart: | shadedclient | 33m 48s | | patch has no errors when building and testing our client artifacts. |
|||| _ Other Tests _ |
| +1 :green_heart: | unit | 23m 4s | | hadoop-hdfs-rbf in the patch passed. |
| +1 :green_heart: | asflicense | 0m 42s | | The patch does not generate ASF License warnings. |
| | | 153m 11s | | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6135/3/artifact/out/Dockerfile |
| GITHUB PR | https://github.com/apache/hadoop/pull/6135 |
| Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
| uname | Linux 81494035c437 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/bin/hadoop.sh |
| git revision | trunk / ec9d5cbe911a9a46fb52e0a6e8ac91c490a09464 |
| Default Java | Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| Multi-JDK versions | /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6135/3/testReport/ |
| Max. process+thread count | 2226 (vs. ulimit of 5500) |
| modules | C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf |
| Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6135/3/console |
| versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.14.0 https://yetus.apache.org |
This message was automatically generated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
[GitHub] [hadoop] hadoop-yetus commented on pull request #6135: HDFS-17214. RBF: The Quata class's andByStorageType method res has an incorrect initial value.
Posted by "hadoop-yetus (via GitHub)" <gi...@apache.org>.
hadoop-yetus commented on PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#issuecomment-1742447981
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Logfile | Comment |
|:----:|----------:|--------:|:--------:|:-------:|
| +0 :ok: | reexec | 0m 55s | | 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 | 44m 54s | | trunk passed |
| +1 :green_heart: | compile | 0m 45s | | trunk passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 |
| +1 :green_heart: | compile | 0m 42s | | trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| +1 :green_heart: | checkstyle | 0m 35s | | trunk passed |
| +1 :green_heart: | mvnsite | 0m 46s | | trunk passed |
| +1 :green_heart: | javadoc | 0m 48s | | trunk passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 |
| +1 :green_heart: | javadoc | 0m 36s | | trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| +1 :green_heart: | spotbugs | 1m 28s | | trunk passed |
| +1 :green_heart: | shadedclient | 34m 4s | | branch has no errors when building and testing our client artifacts. |
|||| _ Patch Compile Tests _ |
| +1 :green_heart: | mvninstall | 0m 33s | | the patch passed |
| +1 :green_heart: | compile | 0m 34s | | the patch passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 |
| +1 :green_heart: | javac | 0m 34s | | the patch passed |
| +1 :green_heart: | compile | 0m 31s | | the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| +1 :green_heart: | javac | 0m 31s | | 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 33s | | the patch passed |
| +1 :green_heart: | javadoc | 0m 30s | | the patch passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 |
| +1 :green_heart: | javadoc | 0m 27s | | the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| +1 :green_heart: | spotbugs | 1m 21s | | the patch passed |
| +1 :green_heart: | shadedclient | 33m 35s | | patch has no errors when building and testing our client artifacts. |
|||| _ Other Tests _ |
| +1 :green_heart: | unit | 23m 15s | | hadoop-hdfs-rbf in the patch passed. |
| +1 :green_heart: | asflicense | 0m 43s | | The patch does not generate ASF License warnings. |
| | | 153m 1s | | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6135/2/artifact/out/Dockerfile |
| GITHUB PR | https://github.com/apache/hadoop/pull/6135 |
| Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
| uname | Linux ae996e908f8c 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/bin/hadoop.sh |
| git revision | trunk / 0dfa9d91728e5fd2bae2160070cfd57a1a72359d |
| Default Java | Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| Multi-JDK versions | /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05 |
| Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6135/2/testReport/ |
| Max. process+thread count | 2177 (vs. ulimit of 5500) |
| modules | C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf |
| Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6135/2/console |
| versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.14.0 https://yetus.apache.org |
This message was automatically generated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quota class' andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "simbadzina (via GitHub)" <gi...@apache.org>.
simbadzina commented on PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#issuecomment-1745226356
I've merged the change. Thanks for the contribution @xiaojunxiang2023
In the commit message your name appears as `xiaojunxiang`. Is that how you'd like it to appear or there is a better formatting?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quota class' andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "simbadzina (via GitHub)" <gi...@apache.org>.
simbadzina commented on code in PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#discussion_r1343375242
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterQuota.java:
##########
@@ -1168,6 +1170,32 @@ public void testQuotaUpdateWhenDestinationNotPresent() throws Exception {
assertEquals(0, quotaUsage.getSpaceConsumed());
}
+ @Test
+ public void testAndByStorageType() {
+ long[] typeQuota = new long[StorageType.values().length];
+ Arrays.fill(typeQuota, HdfsConstants.QUOTA_DONT_SET);
+
+ Predicate<StorageType> predicate = new Predicate<StorageType>() {
+ @Override
+ public boolean test(StorageType storageType) {
+ return typeQuota[storageType.ordinal()] == HdfsConstants.QUOTA_DONT_SET;
+ }
+ };
+
+ assertTrue(Quota.andByStorageType(predicate));
+
+ typeQuota[0] = 2023;
+ assertFalse(Quota.andByStorageType(predicate));
+
+ Arrays.fill(typeQuota, HdfsConstants.QUOTA_DONT_SET);
+ typeQuota[1] = 2023;
+ assertFalse(Quota.andByStorageType(predicate));
+
+ Arrays.fill(typeQuota, HdfsConstants.QUOTA_DONT_SET);
+ typeQuota[typeQuota.length-1] = 2023;
+ assertFalse(Quota.andByStorageType(predicate));
Review Comment:
Thanks for the fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quota class' andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "simbadzina (via GitHub)" <gi...@apache.org>.
simbadzina merged PR #6135:
URL: https://github.com/apache/hadoop/pull/6135
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quota class' andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "simbadzina (via GitHub)" <gi...@apache.org>.
simbadzina commented on code in PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#discussion_r1343261202
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterQuota.java:
##########
@@ -1168,6 +1170,32 @@ public void testQuotaUpdateWhenDestinationNotPresent() throws Exception {
assertEquals(0, quotaUsage.getSpaceConsumed());
}
+ @Test
+ public void testAndByStorageType() {
+ long[] typeQuota = new long[StorageType.values().length];
+ Arrays.fill(typeQuota, HdfsConstants.QUOTA_DONT_SET);
+
+ Predicate<StorageType> predicate = new Predicate<StorageType>() {
+ @Override
+ public boolean test(StorageType storageType) {
+ return typeQuota[storageType.ordinal()] == HdfsConstants.QUOTA_DONT_SET;
+ }
+ };
+
+ assertTrue(Quota.andByStorageType(predicate));
+
+ typeQuota[0] = 2023;
+ assertFalse(Quota.andByStorageType(predicate));
+
+ Arrays.fill(typeQuota, HdfsConstants.QUOTA_DONT_SET);
+ typeQuota[1] = 2023;
+ assertFalse(Quota.andByStorageType(predicate));
+
+ Arrays.fill(typeQuota, HdfsConstants.QUOTA_DONT_SET);
+ typeQuota[typeQuota.length-1] = 2023;
+ assertFalse(Quota.andByStorageType(predicate));
Review Comment:
I recommend using a constant like HdfsConstants.QUOTA_RESET here instead of 2023.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quota class' andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "simbadzina (via GitHub)" <gi...@apache.org>.
simbadzina commented on PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#issuecomment-1745395833
Great, we can keep it as it is then.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quota class' andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "simbadzina (via GitHub)" <gi...@apache.org>.
simbadzina commented on PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#issuecomment-1745351322
I meant formatting that to capitalize your first name and last name. For example
```
$ git config --global user.name "Xiaojun Xiang"
```
For this commit I'm not sure if we can still reword it, but for future commit you can adjust the `user.name` if you want.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
Re: [PR] HDFS-17214. RBF: The Quota class' andByStorageType method res has an incorrect initial value. [hadoop]
Posted by "simbadzina (via GitHub)" <gi...@apache.org>.
simbadzina commented on code in PR #6135:
URL: https://github.com/apache/hadoop/pull/6135#discussion_r1343261202
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterQuota.java:
##########
@@ -1168,6 +1170,32 @@ public void testQuotaUpdateWhenDestinationNotPresent() throws Exception {
assertEquals(0, quotaUsage.getSpaceConsumed());
}
+ @Test
+ public void testAndByStorageType() {
+ long[] typeQuota = new long[StorageType.values().length];
+ Arrays.fill(typeQuota, HdfsConstants.QUOTA_DONT_SET);
+
+ Predicate<StorageType> predicate = new Predicate<StorageType>() {
+ @Override
+ public boolean test(StorageType storageType) {
+ return typeQuota[storageType.ordinal()] == HdfsConstants.QUOTA_DONT_SET;
+ }
+ };
+
+ assertTrue(Quota.andByStorageType(predicate));
+
+ typeQuota[0] = 2023;
+ assertFalse(Quota.andByStorageType(predicate));
+
+ Arrays.fill(typeQuota, HdfsConstants.QUOTA_DONT_SET);
+ typeQuota[1] = 2023;
+ assertFalse(Quota.andByStorageType(predicate));
+
+ Arrays.fill(typeQuota, HdfsConstants.QUOTA_DONT_SET);
+ typeQuota[typeQuota.length-1] = 2023;
+ assertFalse(Quota.andByStorageType(predicate));
Review Comment:
I recommend using a constant like `HdfsConstants.QUOTA_RESET` here instead of `2023`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org