Uh oh!
There was an error while loading. Please reload this page.
HBASE-27746 Check if the file system supports storage policy before invoking setStoragePolicy() - #5189
Conversation
…nvoking setStoragePolicy() Change-Id: I1fcc90ec23f3b23a6876f094436320d9eb8480ee
Apache-HBase
commented
Apr 19, 2023
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Apr 19, 2023
💔 -1 overall
This message was automatically generated. |
Apache9
commented
Apr 19, 2023
Please run mvn spotless to fix the style issue? |
Change-Id: I7cab20073e24b97dd6b3090723f30941febd40b4
jojochuang
commented
Apr 19, 2023
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); |
There was a problem hiding this comment.
This line is required otherwise uri is null pointer and will fail hasPathCapability() API.
There was a problem hiding this comment.
Can we not use the 'hdfs' scheme here? It is not HDFS, actually...
Apache-HBase
commented
Apr 19, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Apr 20, 2023
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Apr 20, 2023
💔 -1 overall
This message was automatically generated. |
jojochuang
commented
Apr 20, 2023
The failed test doesn't look related. @taklwu can you help review this one? |
Apache9
commented
Apr 23, 2023
The only concern is about the scheme we use when testing, all others are OK. |
Apache9
commented
Jun 16, 2023
Any updates here @jojochuang ? |
jojochuang
commented
Jun 16, 2023
Well actually the test would fail if it's not "hdfs"
|
jojochuang
commented
Aug 20, 2024
Looks like this one got missed out. I'll merge it now. |
NihalJain
commented
Aug 21, 2024
Hi @jojochuang we should put this in branch-3 as well, right? Do you plan to backport? |
jojochuang
commented
Aug 21, 2024
Yes thanks for reminder. I'll take this up. |
…nvoking setStoragePolicy() (apache#5189) (cherry picked from commit 0646151)
…nvoking setStoragePolicy() (apache#5189) (cherry picked from commit 0646151) (cherry picked from commit 35b11eb)
…nvoking setStoragePolicy() (apache#5189) (cherry picked from commit 0646151) (cherry picked from commit 35b11eb) (cherry picked from commit d93c0c0)
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.