This is an automated email from the ASF dual-hosted git repository.

jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 054ee473f [ISSUE #6482]style: Rename the variable "filepath" to 
"filePath" on line 55 of PosixFileSegment.java
054ee473f is described below

commit 054ee473fd665414ef31d3e2a4235ad4525e22d8
Author: Sena0777 <[email protected]>
AuthorDate: Mon Mar 27 18:50:37 2023 +0800

    [ISSUE #6482]style: Rename the variable "filepath" to "filePath" on line 55 
of PosixFileSegment.java
---
 .../tieredstore/provider/posix/PosixFileSegment.java   | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

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 9d9620faf..f149df33e 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
@@ -52,7 +52,7 @@ public class PosixFileSegment extends TieredFileSegment {
     private static final String OPERATION_POSIX_WRITE = "write";
 
     private final String basePath;
-    private final String filepath;
+    private final String filePath;
 
     private volatile File file;
     private volatile FileChannel readFileChannel;
@@ -68,7 +68,7 @@ public class PosixFileSegment extends TieredFileSegment {
         } else {
             this.basePath = basePath + File.separator;
         }
-        this.filepath = this.basePath
+        this.filePath = this.basePath
             + TieredStoreUtil.getHash(storeConfig.getBrokerClusterName()) + 
"_" + storeConfig.getBrokerClusterName() + File.separator
             + messageQueue.getBrokerName() + File.separator
             + messageQueue.getTopic() + File.separator
@@ -86,7 +86,7 @@ public class PosixFileSegment extends TieredFileSegment {
 
     @Override
     public String getPath() {
-        return filepath;
+        return filePath;
     }
 
     @Override
@@ -107,7 +107,7 @@ public class PosixFileSegment extends TieredFileSegment {
         if (file == null) {
             synchronized (this) {
                 if (file == null) {
-                    File file = new File(filepath);
+                    File file = new File(filePath);
                     try {
                         File dir = file.getParentFile();
                         if (!dir.exists()) {
@@ -120,7 +120,7 @@ public class PosixFileSegment extends TieredFileSegment {
                         this.writeFileChannel = new RandomAccessFile(file, 
"rwd").getChannel();
                         this.file = file;
                     } catch (Exception e) {
-                        logger.error("PosixFileSegment#createFile: create file 
{} failed: ", filepath, e);
+                        logger.error("PosixFileSegment#createFile: create file 
{} failed: ", filePath, e);
                     }
                 }
             }
@@ -137,7 +137,7 @@ public class PosixFileSegment extends TieredFileSegment {
                 writeFileChannel.close();
             }
         } catch (IOException e) {
-            logger.error("PosixFileSegment#destroyFile: destroy file {} 
failed: ", filepath, e);
+            logger.error("PosixFileSegment#destroyFile: destroy file {} 
failed: ", filePath, e);
         }
 
         if (file.exists()) {
@@ -174,7 +174,7 @@ public class PosixFileSegment extends TieredFileSegment {
             attributesBuilder.put(LABEL_SUCCESS, false);
             TieredStoreMetricsManager.providerRpcLatency.record(costTime, 
attributesBuilder.build());
             logger.error("PosixFileSegment#read0: read file {} failed: 
position: {}, length: {}",
-                filepath, position, length, e);
+                    filePath, position, length, e);
             future.completeExceptionally(e);
         }
         return future;
@@ -194,7 +194,7 @@ public class PosixFileSegment extends TieredFileSegment {
                     byte[] byteArray = ByteStreams.toByteArray(inputStream);
                     if (byteArray.length != length) {
                         logger.error("PosixFileSegment#commit0: append file {} 
failed: real data size: {}, is not equal to length: {}",
-                            filepath, byteArray.length, length);
+                                filePath, byteArray.length, length);
                         future.complete(false);
                         return;
                     }
@@ -220,7 +220,7 @@ public class PosixFileSegment extends TieredFileSegment {
                     
TieredStoreMetricsManager.providerRpcLatency.record(costTime, 
attributesBuilder.build());
 
                     logger.error("PosixFileSegment#commit0: append file {} 
failed: position: {}, length: {}",
-                        filepath, position, length, e);
+                            filePath, position, length, e);
                     future.completeExceptionally(e);
                 }
             });

Reply via email to