You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2025/06/05 21:10:53 UTC
Re: [PR] Implement single thread for bulk operations [accumulo]
keith-turner commented on code in PR #5592:
URL: https://github.com/apache/accumulo/pull/5592#discussion_r2130390727
##########
server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java:
##########
@@ -323,11 +322,9 @@ public boolean rename(Path path, Path newPath) throws IOException {
}
@Override
- public void bulkRename(Map<Path,Path> oldToNewPathMap, int poolSize, String poolName,
- FateId fateId) throws IOException {
+ public void bulkRename(Map<Path,Path> oldToNewPathMap, ExecutorService workerPool, FateId fateId)
Review Comment:
This method shuts down the thread pool and waits for its termination later. Now that the thread pool is passed in, that code should be removed.
##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/BulkImportMove.java:
##########
@@ -97,8 +94,7 @@ private void moveFiles(FateId fateId, Path sourceDir, Path bulkDir, Manager mana
final VolumeManager fs, Map<String,String> renames) throws Exception {
manager.getContext().getAmple().addBulkLoadInProgressFlag(
"/" + bulkDir.getParent().getName() + "/" + bulkDir.getName(), fateId);
- AccumuloConfiguration aConf = manager.getConfiguration();
- int workerCount = aConf.getCount(Property.MANAGER_RENAME_THREADS);
+ ExecutorService workerPool = manager.getWorkerPool();
Review Comment:
Could this variable be inlined?
##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/tableImport/MoveExportedFiles.java:
##########
@@ -59,8 +57,8 @@ class MoveExportedFiles extends ManagerRepo {
@Override
public Repo<Manager> call(FateId fateId, Manager manager) throws Exception {
- int workerCount = manager.getConfiguration().getCount(Property.MANAGER_RENAME_THREADS);
VolumeManager fs = manager.getVolumeManager();
+ ExecutorService workerPool = manager.getWorkerPool();
Review Comment:
Could this variable be inlined?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org