swamirishi commented on code in PR #6182:
URL: https://github.com/apache/ozone/pull/6182#discussion_r1499615410
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -282,35 +279,16 @@ public PersistentMap<String, SnapshotDiffJob>
getSnapDiffJobTable() {
return snapDiffJobTable;
}
- private Optional<ManagedSSTDumpTool> initSSTDumpTool(
- final OzoneConfiguration conf) {
- if (conf.getBoolean(OMConfigKeys.OZONE_OM_SNAPSHOT_LOAD_NATIVE_LIB,
- OMConfigKeys.OZONE_OM_SNAPSHOT_LOAD_NATIVE_LIB_DEFAULT)) {
+ private boolean initNativeLibraryForEfficientDiff(final OzoneConfiguration
conf) {
+ if (conf.getBoolean(OZONE_OM_SNAPSHOT_LOAD_NATIVE_LIB,
OZONE_OM_SNAPSHOT_LOAD_NATIVE_LIB_DEFAULT)) {
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));
+ return ManagedRawSSTFileReader.loadLibrary();
} catch (NativeLibraryNotLoadedException e) {
- this.sstDumpToolExecService.ifPresent(exec ->
- closeExecutorService(exec, "SstDumpToolExecutor"));
+ LOG.info("Native Library for raw sst file reading loading failed.", e);
Review Comment:
done
--
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]