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

ddanielr 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 01a8824789 Use the same table configuration for all files (#6026)
01a8824789 is described below

commit 01a882478945ba863016163c4f6a6ba9be0d1aa0
Author: Daniel Roberts <[email protected]>
AuthorDate: Wed Dec 17 12:02:28 2025 -0500

    Use the same table configuration for all files (#6026)
    
    Moves the tableConfig outside of the for loop so it only requests the
    config once per scan instead of once per file.
---
 .../base/src/main/java/org/apache/accumulo/server/fs/FileManager.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/fs/FileManager.java 
b/server/base/src/main/java/org/apache/accumulo/server/fs/FileManager.java
index b2f9daeccd..23ebfd1e23 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/FileManager.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/FileManager.java
@@ -52,6 +52,7 @@ import org.apache.accumulo.core.metadata.schema.DataFileValue;
 import org.apache.accumulo.core.sample.impl.SamplerConfigurationImpl;
 import org.apache.accumulo.core.util.threads.ThreadPools;
 import org.apache.accumulo.server.ServerContext;
+import org.apache.accumulo.server.conf.TableConfiguration;
 import org.apache.accumulo.server.problems.ProblemReport;
 import org.apache.accumulo.server.problems.ProblemReportingIterator;
 import org.apache.accumulo.server.problems.ProblemReports;
@@ -297,6 +298,8 @@ public class FileManager {
     // limitations
     closeReaders(filesToClose);
 
+    TableConfiguration tableConf = 
context.getTableConfiguration(tablet.tableId());
+
     // open any files that need to be opened
     for (String file : filesToOpen) {
       try {
@@ -306,7 +309,6 @@ public class FileManager {
         Path path = new Path(file);
         FileSystem ns = context.getVolumeManager().getFileSystemByPath(path);
         // log.debug("Opening "+file + " path " + path);
-        var tableConf = context.getTableConfiguration(tablet.tableId());
         FileSKVIterator reader = 
FileOperations.getInstance().newReaderBuilder()
             .forFile(path.toString(), ns, ns.getConf(), 
tableConf.getCryptoService())
             .withTableConfiguration(tableConf).withCacheProvider(cacheProvider)

Reply via email to