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

kturner pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 64ab773ed6 fixes log recovery by creating parent directories (#5776)
64ab773ed6 is described below

commit 64ab773ed6a0dd39f623e6992a5dc052a358f66b
Author: Keith Turner <[email protected]>
AuthorDate: Mon Aug 4 13:29:39 2025 -0400

    fixes log recovery by creating parent directories (#5776)
    
    Changes in #5743 made RFileOperations use a HDFS builder to create an
    output stream.  Prior to using the builder the calls to HDFS to create
    an output stream would also create parent directories if they did not
    exist.  Seems the log recovery code in accumulo was relying on this
    behavior.  Added an option to the builder to create parent dirs if they
    do not exists.
    
    This problem was detected by TotalQueuedIT which was failing in log
    recovery and the tserver had exception about a parent directory not
    existing.  With these changes TotalQueuedIT now passes.
    
    Could not find javadoc on the old HDFS API calls that mentioned that the
    parent directory was created.  Wrote some test code that called the
    previous APIs and confirmed that parent dirs were created if needed.
---
 .../main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java 
b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java
index c426169784..19b020a3d1 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java
@@ -148,6 +148,9 @@ public class RFileOperations extends FileOperations {
           builder = builder.syncBlock();
         }
 
+        // create parent directories if they do not exist
+        builder = builder.recursive();
+
         switch (ecEnable) {
           case ENABLE:
             String ecPolicyName =

Reply via email to