-
Notifications
You must be signed in to change notification settings - Fork 250
Closed
Description
snappy-java has two implementations of Snappy, one native implementation written in C/C++ and one written in Java called PureJavaSnappy.
At the moment the consumers of snappy-java cannot force to use the native implementation as snappy-java always falls back to PureJavaSnappy in case of any errors during loading of the native library. This is unfortunate not only because it limits the choices of the consumer but also because different people have reported issues with PureJavaSnappy, most notably #295.
The fallback to PureJavaSnappy was implemented with #244
static synchronized SnappyApi loadSnappyApi() {
...
try {
if(Boolean.parseBoolean(System.getProperty(KEY_SNAPPY_PUREJAVA, "false"))) {
// Use pure-java Snappy implementation
setSnappyApi(new PureJavaSnappy());
}
else {
loadNativeLibrary();
setSnappyApi(new SnappyNative());
}
}
catch(Throwable e) {
// Fall-back to pure-java Snappy implementation
setSnappyApi(new PureJavaSnappy());
}
...Metadata
Metadata
Assignees
Labels
No labels