Remove the usage of must_cache and async_cache#17963
Remove the usage of must_cache and async_cache#17963alluxio-bot merged 15 commits intoAlluxio:mainfrom
Conversation
| Automated checks report:
Some checks failed. Please fix the reported issues and reply 'alluxio-bot, check this please' to re-run checks. |
| Automated checks report:
All checks passed! |
| Please also have a simple test to make sure it works. |
| @Test | ||
| public void checksum() throws Exception { | ||
| FileSystemTestUtils.createByteFile(sFileSystem, "/testFile", WritePType.MUST_CACHE, 10); | ||
| FileSystemTestUtils.createByteFile(sFileSystem, "/testFile", WritePType.CACHE_THROUGH, 10); |
There was a problem hiding this comment.
For this kind of manually set write types, what do you think about declaring a shared var?
class ChecksumCommandIntegrationTest { public static final WritePType DEFAULT_WRITE_TYPE = WritePType.CACHE_THROUGH; // keep using this constant throughout your test } You don't save any code in this PR, but you may save a lot in later PRs (if you tweak the default write type).
All these test class files may share the same DEFAULT_WRITE_TYPE if you find a good place to declare this constant like some existing TestUtils.java or XXXTestBase.java?
There was a problem hiding this comment.
@jiacheliu3 I'm not sure if we expect a default value for the different unit tests. For the general default value, we only need to set DEFAULT_WRITE_TYPE in the cluster resouce configuration in some based test class.
Except that, I saw the most cases is it wants to excute a specific opration with a specific write type. we can not easily replace them with a DEFAULT_WRITE_TYPE in general.
There was a problem hiding this comment.
Makes sense. In that case feel free to use a local DEFAULT_WRITE_TYPE if you feel we might wanna change the write type in tests again. Otherwise no need to bother :)
� Conflicts: � dora/tests/src/test/java/alluxio/client/cli/fs/command/DuCommandIntegrationTest.java
� Conflicts: � dora/tests/src/test/java/alluxio/client/cli/fs/command/PersistCommandTest.java � dora/tests/src/test/java/alluxio/client/cli/fs/command/PinCommandIntegrationTest.java � dora/tests/src/test/java/alluxio/client/cli/fs/command/SetFaclCommandIntegrationTest.java � dora/tests/src/test/java/alluxio/client/cli/fs/command/SetTtlCommandIntegrationTest.java
� Conflicts: � dora/stress/shell/src/main/java/alluxio/stress/cli/MaxFileBench.java � dora/tests/src/test/java/alluxio/client/cli/fs/command/CountCommandTest.java
jiacheliu3 left a comment
There was a problem hiding this comment.
LGTM with one minor comment, thanks for the work!
| */ | ||
| public final class ReportCommandIntegrationTest extends AbstractFsAdminShellTest { | ||
| @Test | ||
| @Ignore |
� Conflicts: � dora/tests/integration/src/main/java/alluxio/master/backcompat/ops/AsyncPersist.java � dora/tests/integration/src/test/java/alluxio/client/fs/io/FileOutStreamAsyncWriteIntegrationTest.java � dora/tests/integration/src/test/java/alluxio/client/fs/io/FileOutStreamAsyncWriteJobIntegrationTest.java
| alluxio-bot, merge this please |
What changes are proposed in this pull request?
current version didn't support must_cache and async_cache, so remove the usage of must_cache and async_cache usage in code and mark deprecated to prevent any use.
Why are the changes needed?
This change focuses on removing the write type of MUST_CACHE and ASYNC_CACHE, and #17980 would remove the master-side code about async persist.
Does this PR introduce any user facing changes?
No