ctubbsii commented on a change in pull request #2414:
URL: https://github.com/apache/accumulo/pull/2414#discussion_r789118544



##########
File path: 
minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java
##########
@@ -327,6 +334,13 @@ public MiniAccumuloClusterImpl(MiniAccumuloConfigImpl 
config) throws IOException
 
     this.config = config.initialize();
 
+    if (Boolean.TRUE.equals(Boolean
+        
.valueOf(this.config.getSiteConfig().get(Property.TSERV_NATIVEMAP_ENABLED.name()))))
 {
+      if (!NativeMap.isLoaded())
+        throw new RuntimeException(
+            "MAC configured to use native maps, but unable to load the 
library.");
+    }
+

Review comment:
       > This checks that NativeMap will be able to load the library in this 
test thread before starting up the processes.
   
   There's no reason to believe that this test thread should be able to load 
the library. It doesn't have the native maps on its linker path. It's ability, 
or inability, to load native maps has no bearing on whether the tserver process 
that mini launches will be able to do so. They have different environments.
   
   > `ConfigurableMacBase.createMiniAccumulo` sets `TSERV_NATIVEMAP_ENABLED` to 
true and then starts MAC.
   
   Yes, and the way this works is that `MiniAccumuloClusterImpl` sets the 
`LD_LIBRARY_PATH` in the environment for the tserver's `Process`. Nothing does 
that for the test thread's environment. There's no reason to expect it to be 
able to load native maps.




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


Reply via email to