Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1249,4 +1249,8 @@ public void notifyPropertiesUpdated(Map<String, String> updatedProps) {
Env.getCurrentEnv().getExtMetaCacheMgr().invalidSchemaCache(id);
}
}

public ThreadPoolExecutor getThreadPoolExecutor() {
return threadPoolWithPreAuth;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.stream.Collectors;

public class IcebergMetadataOps implements ExternalMetadataOps {
Expand Down Expand Up @@ -346,4 +347,8 @@ private Namespace getNamespace(String dbName) {
private Namespace getNamespace() {
return externalCatalogName.map(Namespace::of).orElseGet(() -> Namespace.empty());
}

public ThreadPoolExecutor getThreadPoolWithPreAuth() {
return dorisCatalog.getThreadPoolExecutor();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private synchronized Table getNativeTable(SimpleTableInfo tableInfo) {

private void commitAppendTxn(Table table, List<WriteResult> pendingResults) {
// commit append files.
AppendFiles appendFiles = table.newAppend();
AppendFiles appendFiles = table.newAppend().scanManifestsWith(ops.getThreadPoolWithPreAuth());
for (WriteResult result : pendingResults) {
Preconditions.checkState(result.referencedDataFiles().length == 0,
"Should have no referenced data files for append.");
Expand All @@ -171,7 +171,7 @@ private void commitReplaceTxn(Table table, List<WriteResult> pendingResults) {
// 1. if dst_tb is a partitioned table, it will return directly.
// 2. if dst_tb is an unpartitioned table, the `dst_tb` table will be emptied.
if (!table.spec().isPartitioned()) {
OverwriteFiles overwriteFiles = table.newOverwrite();
OverwriteFiles overwriteFiles = table.newOverwrite().scanManifestsWith(ops.getThreadPoolWithPreAuth());
try (CloseableIterable<FileScanTask> fileScanTasks = table.newScan().planFiles()) {
fileScanTasks.forEach(f -> overwriteFiles.deleteFile(f.file()));
} catch (IOException e) {
Expand Down