ctubbsii commented on a change in pull request #2414:
URL: https://github.com/apache/accumulo/pull/2414#discussion_r789623850
##########
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 inspired me to create #2425 , which will accomplish what you were
trying to do inside Mini, but does it inside ConfigurableMacBase, among other
improvements. I think there's still something that can be done here, though.
This could become something like:
```java
if
(Boolean.valueOf(config.getSiteConfig().get(Property.TSERV_NATIVEMAP_ENABLED.getKey()))
&& config.getNativeLibPaths().length == 0
&&
!config.getSystemProperties().containsKey("accumulo.native.lib.path")) {
throw new RuntimeException(
"MAC configured to use native maps, but native library path was
not provided.");
}
```
--
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]