From 0124da56b84f5a08dd0344433b9c4a59ac15a555 Mon Sep 17 00:00:00 2001 From: lizhimins <707364882@qq.com> Date: Tue, 14 Nov 2023 15:52:16 +0800 Subject: [PATCH] [ISSUE #5923] Revert "Fix tiered store README.md error about Configuration (#7436)" This reverts commit 70dc93abbcb9bf161378d66fcaca55bedc78b905. --- .../tieredstore/common/TieredMessageStoreConfig.java | 10 +++++----- .../tieredstore/provider/posix/PosixFileSegment.java | 4 ++-- .../rocketmq/tieredstore/file/TieredCommitLogTest.java | 2 +- .../provider/posix/PosixFileSegmentTest.java | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tieredstore/src/main/java/org/apache/rocketmq/tieredstore/common/TieredMessageStoreConfig.java b/tieredstore/src/main/java/org/apache/rocketmq/tieredstore/common/TieredMessageStoreConfig.java index a112ea6b102..595db6b865c 100644 --- a/tieredstore/src/main/java/org/apache/rocketmq/tieredstore/common/TieredMessageStoreConfig.java +++ b/tieredstore/src/main/java/org/apache/rocketmq/tieredstore/common/TieredMessageStoreConfig.java @@ -115,7 +115,7 @@ public boolean check(TieredStorageLevel targetLevel) { private long readAheadCacheExpireDuration = 10 * 1000; private double readAheadCacheSizeThresholdRate = 0.3; - private String tieredStoreFilepath = ""; + private String tieredStoreFilePath = ""; private String objectStoreEndpoint = ""; @@ -350,12 +350,12 @@ public void setReadAheadCacheSizeThresholdRate(double rate) { this.readAheadCacheSizeThresholdRate = rate; } - public String getTieredStoreFilepath() { - return tieredStoreFilepath; + public String getTieredStoreFilePath() { + return tieredStoreFilePath; } - public void setTieredStoreFilepath(String tieredStoreFilepath) { - this.tieredStoreFilepath = tieredStoreFilepath; + public void setTieredStoreFilePath(String tieredStoreFilePath) { + this.tieredStoreFilePath = tieredStoreFilePath; } public void setObjectStoreEndpoint(String objectStoreEndpoint) { diff --git a/tieredstore/src/main/java/org/apache/rocketmq/tieredstore/provider/posix/PosixFileSegment.java b/tieredstore/src/main/java/org/apache/rocketmq/tieredstore/provider/posix/PosixFileSegment.java index 708ce33f916..7e949cb28cc 100644 --- a/tieredstore/src/main/java/org/apache/rocketmq/tieredstore/provider/posix/PosixFileSegment.java +++ b/tieredstore/src/main/java/org/apache/rocketmq/tieredstore/provider/posix/PosixFileSegment.java @@ -66,8 +66,8 @@ public PosixFileSegment(TieredMessageStoreConfig storeConfig, super(storeConfig, fileType, filePath, baseOffset); // basePath - String basePath = StringUtils.defaultString(storeConfig.getTieredStoreFilepath(), - StringUtils.appendIfMissing(storeConfig.getTieredStoreFilepath(), File.separator)); + String basePath = StringUtils.defaultString(storeConfig.getTieredStoreFilePath(), + StringUtils.appendIfMissing(storeConfig.getTieredStoreFilePath(), File.separator)); // fullPath: basePath/hash_cluster/broker/topic/queueId/fileType/baseOffset String brokerClusterName = storeConfig.getBrokerClusterName(); diff --git a/tieredstore/src/test/java/org/apache/rocketmq/tieredstore/file/TieredCommitLogTest.java b/tieredstore/src/test/java/org/apache/rocketmq/tieredstore/file/TieredCommitLogTest.java index 80cdba9778b..6693d3cb790 100644 --- a/tieredstore/src/test/java/org/apache/rocketmq/tieredstore/file/TieredCommitLogTest.java +++ b/tieredstore/src/test/java/org/apache/rocketmq/tieredstore/file/TieredCommitLogTest.java @@ -49,7 +49,7 @@ public void setUp() throws ClassNotFoundException, NoSuchMethodException { TieredMessageStoreConfig storeConfig = new TieredMessageStoreConfig(); storeConfig.setBrokerName("brokerName"); storeConfig.setStorePathRootDir(storePath); - storeConfig.setTieredStoreFilepath(storePath + File.separator); + storeConfig.setTieredStoreFilePath(storePath + File.separator); storeConfig.setTieredBackendServiceProvider("org.apache.rocketmq.tieredstore.provider.posix.PosixFileSegment"); storeConfig.setCommitLogRollingInterval(0); storeConfig.setTieredStoreCommitLogMaxSize(1000); diff --git a/tieredstore/src/test/java/org/apache/rocketmq/tieredstore/provider/posix/PosixFileSegmentTest.java b/tieredstore/src/test/java/org/apache/rocketmq/tieredstore/provider/posix/PosixFileSegmentTest.java index ede62b8ce92..db33ae847f2 100644 --- a/tieredstore/src/test/java/org/apache/rocketmq/tieredstore/provider/posix/PosixFileSegmentTest.java +++ b/tieredstore/src/test/java/org/apache/rocketmq/tieredstore/provider/posix/PosixFileSegmentTest.java @@ -42,7 +42,7 @@ public class PosixFileSegmentTest { @Before public void setUp() { storeConfig = new TieredMessageStoreConfig(); - storeConfig.setTieredStoreFilepath(storePath); + storeConfig.setTieredStoreFilePath(storePath); mq = new MessageQueue("OSSFileSegmentTest", "broker", 0); TieredStoreExecutor.init(); }