Example #1
0
 /// <summary>Are the native snappy libraries loaded & initialized?</summary>
 public static void CheckNativeCodeLoaded()
 {
     if (!NativeCodeLoader.IsNativeCodeLoaded() || !NativeCodeLoader.BuildSupportsSnappy
             ())
     {
         throw new RuntimeException("native snappy library not available: " + "this version of libhadoop was built without "
                                    + "snappy support.");
     }
     if (!SnappyCompressor.IsNativeCodeLoaded())
     {
         throw new RuntimeException("native snappy library not available: " + "SnappyCompressor has not been loaded."
                                    );
     }
     if (!SnappyDecompressor.IsNativeCodeLoaded())
     {
         throw new RuntimeException("native snappy library not available: " + "SnappyDecompressor has not been loaded."
                                    );
     }
 }
Example #2
0
 public static bool IsNativeCodeLoaded()
 {
     return(SnappyCompressor.IsNativeCodeLoaded() && SnappyDecompressor.IsNativeCodeLoaded
                ());
 }