smengcl opened a new pull request, #8950:
URL: https://github.com/apache/ozone/pull/8950

   ## What changes were proposed in this pull request?
   
   I was using `ozone debug checknative` to check if the rocks-tools lib is 
properly loaded but it always gives me `false`.
   
   I later found that it was because RocksDB library wasn't loaded before 
attempting to load rocks-tools lib (ozone_rocksdb_tools). ozone_rocksdb_tools 
has a dependency on RocksDB library. A symptom is that it throws 
UnsatisfiedLinkError when debugging TestCheckNative. (Interestingly running the 
CLI in dist doesn't give any detail, could be because of the log level.)
   
   The solution is to load RocksDB lib before loading rocks-tools lib, just 
like what 
[`ManagedRawSSTFileReader#loadLibrary`](https://github.com/apache/ozone/blob/cd308eaa85b0a75f2e263c313da320f33fd227ff/hadoop-hdds/rocks-native/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRawSSTFileReader.java#L50-L51)
 does.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-13582
   
   ## How was this patch tested?
   
   - Existing test `TestCheckNative` should cover this when it is run.


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