Skip to content

HBASE-27746 Check if the file system supports storage policy before invoking setStoragePolicy() - #5189

Merged
jojochuang merged 3 commits into
apache:masterfrom
jojochuang:HBASE-27746
Aug 20, 2024
Merged

HBASE-27746 Check if the file system supports storage policy before invoking setStoragePolicy()#5189
jojochuang merged 3 commits into
apache:masterfrom
jojochuang:HBASE-27746

Conversation

@jojochuang

@jojochuangjojochuang commented Apr 19, 2023

Copy link
Copy Markdown
Contributor

Simply check and ignore silently if the underlying FS does not support storage policy.

the hasPathCapability() API is Hadoop 3.2 and above. So do not cherrypick this change to HBase 2.x or lower.

…nvoking setStoragePolicy()
Change-Id: I1fcc90ec23f3b23a6876f094436320d9eb8480ee
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 24sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+1 💚mvninstall4m 3smaster passed
+1 💚compile0m 34smaster passed
+1 💚checkstyle0m 15smaster passed
+1 💚spotless0m 47sbranch has no errors when running spotless:check.
+1 💚spotbugs0m 33smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 37sthe patch passed
+1 💚compile0m 32sthe patch passed
+1 💚javac0m 32sthe patch passed
-0 ⚠️checkstyle0m 12shbase-common: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck14m 16sPatch does not cause any errors with Hadoop 3.2.4 3.3.4.
-1 ❌spotless0m 13spatch has 30 errors when running spotless:check, run spotless:apply to fix.
+1 💚spotbugs0m 37sthe patch passed
_ Other Tests _
+1 💚asflicense0m 9sThe patch does not generate ASF License warnings.
34m 21s
SubsystemReport/Notes
DockerClientAPI=1.42 ServerAPI=1.42 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5189
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux 078dc94c8c37 5.4.0-1094-aws #102~18.04.1-Ubuntu SMP Tue Jan 10 21:07:03 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 94a8f31
Default JavaEclipse Adoptium-11.0.17+8
checkstylehttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-common.txt
spotlesshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/1/artifact/yetus-general-check/output/patch-spotless.txt
Max. process+thread count86 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/1/console
versionsgit=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 26sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall4m 39smaster passed
+1 💚compile0m 17smaster passed
+1 💚shadedjars4m 56sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 18smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 7sthe patch passed
+1 💚compile0m 21sthe patch passed
+1 💚javac0m 21sthe patch passed
+1 💚shadedjars4m 56spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 16sthe patch passed
_ Other Tests _
+1 💚unit2m 35shbase-common in the patch passed.
-1 ❌unit217m 27shbase-server in the patch failed.
245m 6s
SubsystemReport/Notes
DockerClientAPI=1.42 ServerAPI=1.42 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5189
Optional Testsjavac javadoc unit shadedjars compile
unameLinux f9ac1086ae6b 5.4.0-1097-aws #105~18.04.1-Ubuntu SMP Mon Feb 13 17:50:57 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 94a8f31
Default JavaEclipse Adoptium-11.0.17+8
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/1/testReport/
Max. process+thread count2539 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9

Copy link
Copy Markdown
Contributor

Please run mvn spotless to fix the style issue?

Change-Id: I7cab20073e24b97dd6b3090723f30941febd40b4
Change-Id: I4639f791febc29d7f89ee5905e043b5dcb1071dc
@jojochuang

Copy link
Copy Markdown
ContributorAuthor

Thanks for the tips! Updated checkstyle and also fixed the test.

private void verifyNoHDFSApiInvocationForDefaultPolicy() {
private void verifyNoHDFSApiInvocationForDefaultPolicy() throws URISyntaxException, IOException {
FileSystem testFs = new AlwaysFailSetStoragePolicyFileSystem();
testFs.initialize(new URI("hdfs://localhost/"), conf);

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This line is required otherwise uri is null pointer and will fail hasPathCapability() API.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we not use the 'hdfs' scheme here? It is not HDFS, actually...

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 57sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 8sMaven dependency ordering for branch
+1 💚mvninstall3m 22smaster passed
+1 💚compile2m 56smaster passed
+1 💚checkstyle0m 51smaster passed
+1 💚spotless0m 44sbranch has no errors when running spotless:check.
+1 💚spotbugs2m 0smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall3m 18sthe patch passed
+1 💚compile2m 53sthe patch passed
+1 💚javac2m 53sthe patch passed
+1 💚checkstyle0m 48sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck12m 18sPatch does not cause any errors with Hadoop 3.2.4 3.3.4.
+1 💚spotless0m 41spatch has no errors when running spotless:check.
+1 💚spotbugs2m 14sthe patch passed
_ Other Tests _
+1 💚asflicense0m 20sThe patch does not generate ASF License warnings.
41m 22s
SubsystemReport/Notes
DockerClientAPI=1.42 ServerAPI=1.42 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5189
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux bf57ef62419f 5.4.0-144-generic #161-Ubuntu SMP Fri Feb 3 14:49:04 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 398c5ef
Default JavaEclipse Adoptium-11.0.17+8
Max. process+thread count85 (vs. ulimit of 30000)
modulesC: hbase-common hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/2/console
versionsgit=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 24sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for branch
+1 💚mvninstall3m 38smaster passed
+1 💚compile0m 56smaster passed
+1 💚shadedjars4m 38sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 36smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall3m 15sthe patch passed
+1 💚compile0m 57sthe patch passed
+1 💚javac0m 57sthe patch passed
+1 💚shadedjars4m 39spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 34sthe patch passed
_ Other Tests _
+1 💚unit2m 24shbase-common in the patch passed.
+1 💚unit201m 53shbase-server in the patch passed.
228m 48s
SubsystemReport/Notes
DockerClientAPI=1.42 ServerAPI=1.42 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5189
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 099ffbccbdc0 5.4.0-1097-aws #105~18.04.1-Ubuntu SMP Mon Feb 13 17:50:57 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 398c5ef
Default JavaEclipse Adoptium-11.0.17+8
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/2/testReport/
Max. process+thread count2335 (vs. ulimit of 30000)
modulesC: hbase-common hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/2/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 21sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for branch
+1 💚mvninstall2m 59smaster passed
+1 💚compile0m 57smaster passed
+1 💚shadedjars4m 19sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 39smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for patch
+1 💚mvninstall2m 47sthe patch passed
+1 💚compile0m 56sthe patch passed
+1 💚javac0m 56sthe patch passed
+1 💚shadedjars4m 17spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 38sthe patch passed
_ Other Tests _
+1 💚unit1m 56shbase-common in the patch passed.
-1 ❌unit209m 26shbase-server in the patch failed.
234m 21s
SubsystemReport/Notes
DockerClientAPI=1.42 ServerAPI=1.42 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#5189
Optional Testsjavac javadoc unit shadedjars compile
unameLinux cd015a95cec3 5.4.0-137-generic #154-Ubuntu SMP Thu Jan 5 17:03:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 398c5ef
Default JavaTemurin-1.8.0_352-b08
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/2/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/2/testReport/
Max. process+thread count2635 (vs. ulimit of 30000)
modulesC: hbase-common hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5189/2/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@jojochuang
jojochuang requested a review from taklwuApril 20, 2023 17:07
@jojochuang

Copy link
Copy Markdown
ContributorAuthor

The failed test doesn't look related. @taklwu can you help review this one?

@Apache9

Copy link
Copy Markdown
Contributor

The only concern is about the scheme we use when testing, all others are OK.

@Apache9

Copy link
Copy Markdown
Contributor

Any updates here @jojochuang ?

@jojochuang

Copy link
Copy Markdown
ContributorAuthor

Well actually the test would fail if it's not "hdfs"

[ERROR] TestFSUtils.testSetStoragePolicyDefault:412->verifyNoHDFSApiInvocationForDefaultPolicy:422 » IllegalArgument Invalid URI for NameNode address (check fs.defaultFS): failfs://localhost/ is not of scheme 'hdfs'.

@jojochuang

Copy link
Copy Markdown
ContributorAuthor

Looks like this one got missed out. I'll merge it now.

@jojochuang
jojochuang merged commit 0646151 into apache:masterAug 20, 2024
@NihalJain

Copy link
Copy Markdown
Contributor

Hi @jojochuang we should put this in branch-3 as well, right? Do you plan to backport?

@jojochuang

Copy link
Copy Markdown
ContributorAuthor

Yes thanks for reminder. I'll take this up.

jojochuang added a commit to jojochuang/hbase that referenced this pull request Aug 21, 2024
jojochuang added a commit to jojochuang/hbase that referenced this pull request Aug 21, 2024
…nvoking setStoragePolicy() (apache#5189)
(cherry picked from commit 0646151)
(cherry picked from commit 35b11eb)
jojochuang added a commit to jojochuang/hbase that referenced this pull request Aug 21, 2024
…nvoking setStoragePolicy() (apache#5189)
(cherry picked from commit 0646151)
(cherry picked from commit 35b11eb)
(cherry picked from commit d93c0c0)
jojochuang added a commit that referenced this pull request Aug 22, 2024
…nvoking setStoragePolicy() (#5189) (#6170)
(cherry picked from commit 0646151)
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.

5 participants

@jojochuang@Apache-HBase@Apache9@NihalJain@sunhelly