smengcl commented on code in PR #6182:
URL: https://github.com/apache/ozone/pull/6182#discussion_r1499445185


##########
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:
   Use warn or error?
   
   ```suggestion
           LOG.error("Native Library for raw sst file reading loading failed.", 
e);
   ```



##########
hadoop-hdds/rocks-native/src/CMakeLists.txt:
##########
@@ -21,6 +21,7 @@
 #
 
 cmake_minimum_required(VERSION 2.8)
+add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)

Review Comment:
   What is this for?



-- 
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]

Reply via email to