You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using following code to get S3TransferManager reference to upload a mulitipart file to S3 bucket. File upload happens fine but in logs I see Threads uploading multipart file are named as Thread-2, Thread-4 ..... I was expecting them to be named as s3-uploader-2, s3-uploader-4. What am I missing here? Please advise.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using following code to get S3TransferManager reference to upload a mulitipart file to S3 bucket. File upload happens fine but in logs I see
Threads
uploading multipart file are named asThread-2, Thread-4 ....
. I was expecting them to be named ass3-uploader-2, s3-uploader-4
. What am I missing here? Please advise.private S3TransferManager getTransferManager(S3AsyncClient s3ac){
S3TransferManager s3tm = S3TransferManager.builder().executor(createExecutiveService(10, "s3-uploader-")).s3Client(s3ac).build();
return s3tm;
}
private ThreadPoolExecutor createExecutiveService(int threadCount, String threadNamePrefix){
ThreadFactory tfb = new ThreadFactoryBuilder().threadNamePrefix(threadNamePrefix).build();
return (ThreadPoolExecutor) Executors.newFixedThreadPool(threadCount, tfb);
}
Beta Was this translation helpful? Give feedback.
All reactions