Exemplo n.º 1
0
 static {
   if (NativeCodeLoader.isNativeCodeLoaded() && NativeCodeLoader.buildSupportsSnappy()) {
     try {
       initIDs();
       nativeSnappyLoaded = true;
     } catch (Throwable t) {
       LOG.error("failed to load SnappyCompressor", t);
     }
   }
 }
Exemplo n.º 2
0
 static {
   if (NativeCodeLoader.isNativeCodeLoaded()) {
     try {
       // Initialize the native library
       initIDs();
       nativeZlibLoaded = true;
     } catch (Throwable t) {
       // Ignore failure to load/initialize native-zlib
     }
   }
 }
 @Test
 public void testZlibDirectCompressDecompress() {
   int[] size = {1, 4, 16, 4 * 1024, 64 * 1024, 128 * 1024, 1024 * 1024};
   assumeTrue(NativeCodeLoader.isNativeCodeLoaded());
   try {
     for (int i = 0; i < size.length; i++) {
       compressDecompressLoop(size[i]);
     }
   } catch (IOException ex) {
     fail("testZlibDirectCompressDecompress ex !!!" + ex);
   }
 }
 static {
   if (!NativeCodeLoader.isNativeCodeLoaded()) {
     throw new RuntimeException("Bailing out since native library couldn't " + "be loaded");
   }
   LOG.info("Using JniBasedUnixGroupsMapping for Group resolution");
 }