Example usage for org.apache.hadoop.io.compress SnappyCodec checkNativeCodeLoaded

List of usage examples for org.apache.hadoop.io.compress SnappyCodec checkNativeCodeLoaded

Introduction

In this page you can find the example usage for org.apache.hadoop.io.compress SnappyCodec checkNativeCodeLoaded.

Prototype

public static void checkNativeCodeLoaded() 

Source Link

Document

Are the native snappy libraries loaded & initialized?

Usage

From source file:org.apache.apex.malhar.lib.io.fs.AbstractFileOutputOperatorTest.java

License:Apache License

private boolean checkNativeSnappy() {
    try {/*from  www .ja  va2  s .co  m*/
        SnappyCodec.checkNativeCodeLoaded();
    } catch (UnsatisfiedLinkError u) {
        LOG.error("WARNING: Skipping Snappy compression test since native libraries were not found.");
        return true;
    } catch (RuntimeException e) {
        LOG.error("WARNING: Skipping Snappy compression test since native libraries were not found.");
        return true;
    }
    return false;
}