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

fanrui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 1d1fe536022 [hotfix][runtime] Remove the unnecessary private put 
method in FileSystemBlobStore to prevent the createBasePathIfNeeded is called 
repeatedly
1d1fe536022 is described below

commit 1d1fe5360221f603829e15475f9a40e93b940a8d
Author: 1996fanrui <[email protected]>
AuthorDate: Thu Aug 17 16:17:01 2023 +0800

    [hotfix][runtime] Remove the unnecessary private put method in 
FileSystemBlobStore to prevent the createBasePathIfNeeded is called repeatedly
---
 .../org/apache/flink/runtime/blob/FileSystemBlobStore.java     | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/blob/FileSystemBlobStore.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/blob/FileSystemBlobStore.java
index 22fb7064360..141f270e2f8 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/blob/FileSystemBlobStore.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/blob/FileSystemBlobStore.java
@@ -77,15 +77,11 @@ public class FileSystemBlobStore implements 
BlobStoreService {
     @Override
     public boolean put(File localFile, JobID jobId, BlobKey blobKey) throws 
IOException {
         createBasePathIfNeeded();
-        return put(localFile, BlobUtils.getStorageLocationPath(basePath, 
jobId, blobKey));
-    }
-
-    private boolean put(File fromFile, String toBlobPath) throws IOException {
-        createBasePathIfNeeded();
+        String toBlobPath = BlobUtils.getStorageLocationPath(basePath, jobId, 
blobKey);
         try (FSDataOutputStream os =
                 fileSystem.create(new Path(toBlobPath), 
FileSystem.WriteMode.OVERWRITE)) {
-            LOG.debug("Copying from {} to {}.", fromFile, toBlobPath);
-            Files.copy(fromFile, os);
+            LOG.debug("Copying from {} to {}.", localFile, toBlobPath);
+            Files.copy(localFile, os);
 
             os.sync();
         }

Reply via email to