kerneltime commented on code in PR #5719:
URL: https://github.com/apache/ozone/pull/5719#discussion_r1414229317
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -289,28 +289,31 @@ public PersistentMap<String, SnapshotDiffJob>
getSnapDiffJobTable() {
private Optional<ManagedSSTDumpTool> initSSTDumpTool(
final OzoneConfiguration conf) {
- try {
- int threadPoolSize = conf.getInt(
- OMConfigKeys.OZONE_OM_SNAPSHOT_SST_DUMPTOOL_EXECUTOR_POOL_SIZE,
- OMConfigKeys
- .OZONE_OM_SNAPSHOT_SST_DUMPTOOL_EXECUTOR_POOL_SIZE_DEFAULT);
- int bufferSize = (int) conf.getStorageSize(
- OMConfigKeys.OZONE_OM_SNAPSHOT_SST_DUMPTOOL_EXECUTOR_BUFFER_SIZE,
- OMConfigKeys
- .OZONE_OM_SNAPSHOT_SST_DUMPTOOL_EXECUTOR_BUFFER_SIZE_DEFAULT,
- StorageUnit.BYTES);
- this.sstDumpToolExecService = Optional.of(new ThreadPoolExecutor(0,
- threadPoolSize, 60, TimeUnit.SECONDS,
- new SynchronousQueue<>(), new ThreadFactoryBuilder()
- .setNameFormat(ozoneManager.getThreadNamePrefix() +
- "snapshot-diff-manager-sst-dump-tool-TID-%d")
- .build(),
- new ThreadPoolExecutor.DiscardPolicy()));
- return Optional.of(new ManagedSSTDumpTool(sstDumpToolExecService.get(),
- bufferSize));
- } catch (NativeLibraryNotLoadedException e) {
- this.sstDumpToolExecService.ifPresent(exec ->
- closeExecutorService(exec, "SstDumpToolExecutor"));
+ if (conf.getBoolean(OMConfigKeys.OZONE_OM_SNAPSHOT_NATIVE_LIB_ENABLED_DIFF,
Review Comment:
I do not think that if snapshot are enabled this should be optional. I agree
with @hemantk-12 that this should tied to ability to create snapshots.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]