Skip to content

HDFS-16693. RBF: fix NPE in Quota - #4633

Closed
WeisonWei wants to merge 1 commit into
apache:trunkfrom
WeisonWei:HDFS-16693
Closed

HDFS-16693. RBF: fix NPE in Quota#4633
WeisonWei wants to merge 1 commit into
apache:trunkfrom
WeisonWei:HDFS-16693

Conversation

@WeisonWei

Copy link
Copy Markdown
Contributor

Description of PR

How was this patch tested?

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@ZanderXu

Copy link
Copy Markdown
Contributor

Thanks @WeisonWei for your contribution. Can you add a UT to reproduce it?

If DFS_ROUTER_QUOTA_ENABLE=false, doesn't getEachQuotaUsage return IOException?

Map<RemoteLocation, QuotaUsage> getEachQuotaUsage(String path)
throws IOException {
rpcServer.checkOperation(OperationCategory.READ);
if (!router.isQuotaEnabled()) {
throw new IOException("The quota system is disabled in Router.");
}
...
}

@hadoop-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 38sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe 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 💚mvninstall38m 29strunk passed
+1 💚compile1m 1strunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚compile0m 58strunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚checkstyle0m 51strunk passed
+1 💚mvnsite1m 2strunk passed
+1 💚javadoc1m 5strunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚javadoc1m 17strunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚spotbugs1m 47strunk passed
+1 💚shadedclient23m 43sbranch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚mvninstall0m 42sthe patch passed
+1 💚compile0m 49sthe patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚javac0m 49sthe patch passed
+1 💚compile0m 37sthe patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚javac0m 37sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 23sthe patch passed
+1 💚mvnsite0m 39sthe patch passed
+1 💚javadoc0m 41sthe patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚javadoc0m 58sthe patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚spotbugs1m 26sthe patch passed
+1 💚shadedclient20m 37spatch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚unit23m 0shadoop-hdfs-rbf in the patch passed.
+1 💚asflicense0m 51sThe patch does not generate ASF License warnings.
123m 23s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4633/1/artifact/out/Dockerfile
GITHUB PR#4633
Optional Testsdupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
unameLinux 61805d2ecd50 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/bin/hadoop.sh
git revisiontrunk / 2ba93be
Default JavaPrivate Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Resultshttps://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4633/1/testReport/
Max. process+thread count2637 (vs. ulimit of 5500)
modulesC: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf
Console outputhttps://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4633/1/console
versionsgit=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered byApache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

*/
private boolean isMountEntry(String path) {
return router.getQuotaManager().isMountEntry(path);
return router.isQuotaEnabled() &&

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be a single line.

@@ -204,7 +204,8 @@ QuotaUsage getGlobalQuota(String path) throws IOException {
* @return {@code true} if path is a mount entry; {@code false} otherwise.
*/
private boolean isMountEntry(String path) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a unit test?

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@WeisonWei@ZanderXu@hadoop-yetus@goiri