In default, no configuration is required to use snappy-java, but you can load your own native library created by 'make native' command.
This SnappyLoader searches for native libraries (snappyjava.dll, libsnappy.so, etc.) in the following order:
If you do not want to use folder java.io.tmpdir, set the System property org.xerial.snappy.tempdir. For example, to use /tmp/leo as a temporary folder to copy native libraries, use -D option of JVM:
java -Dorg.xerial.snappy.tempdir="/tmp/leo" ...
| Modifier and Type | Field and Description |
|---|---|
| private static volatile BitShuffleNative | |
| private static boolean | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| private static File | |
| public static final String | |
| private static volatile SnappyApi |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static void | |
| private static boolean | |
| private static File | extractLibraryFile(String libFolderForCurrentOS, String libraryFileName, String targetFolder)
Extract the specified library file to the target folder |
| pack-priv static File | |
| private static InputStream | |
| public static String | Returns: the version stringGet the snappy-java version by reading pom.properties embedded in jar. |
| private static boolean | |
| pack-priv static synchronized BitShuffleNative | |
| private static synchronized void | |
| pack-priv static synchronized SnappyApi | |
| private static void | loadSnappySystemProperties()
load system properties when configuration file of the name
|
| pack-priv static synchronized void |
| bitshuffleApi | back to summary |
|---|---|
| private static volatile BitShuffleNative bitshuffleApi | |
| isLoaded | back to summary |
|---|---|
| private static boolean isLoaded | |
| KEY_SNAPPY_DISABLE_BUNDLED_LIBS | back to summary |
|---|---|
| public static final String KEY_SNAPPY_DISABLE_BUNDLED_LIBS | |
| KEY_SNAPPY_LIB_NAME | back to summary |
|---|---|
| public static final String KEY_SNAPPY_LIB_NAME | |
| KEY_SNAPPY_LIB_PATH | back to summary |
|---|---|
| public static final String KEY_SNAPPY_LIB_PATH | |
| KEY_SNAPPY_PUREJAVA | back to summary |
|---|---|
| public static final String KEY_SNAPPY_PUREJAVA | |
| KEY_SNAPPY_TEMPDIR | back to summary |
|---|---|
| public static final String KEY_SNAPPY_TEMPDIR | |
| KEY_SNAPPY_USE_SYSTEMLIB | back to summary |
|---|---|
| public static final String KEY_SNAPPY_USE_SYSTEMLIB | |
| nativeLibFile | back to summary |
|---|---|
| private static File nativeLibFile | |
| SNAPPY_SYSTEM_PROPERTIES_FILE | back to summary |
|---|---|
| public static final String SNAPPY_SYSTEM_PROPERTIES_FILE | |
| snappyApi | back to summary |
|---|---|
| private static volatile SnappyApi snappyApi | |
| SnappyLoader | back to summary |
|---|---|
| public SnappyLoader() | |
| cleanUpExtractedNativeLib | back to summary |
|---|---|
| pack-priv static void cleanUpExtractedNativeLib() | |
| contentsEquals | back to summary |
|---|---|
| private static boolean contentsEquals(InputStream in1, InputStream in2) throws IOException | |
| extractLibraryFile | back to summary |
|---|---|
| private static File extractLibraryFile(String libFolderForCurrentOS, String libraryFileName, String targetFolder) Extract the specified library file to the target folder | |
| findNativeLibrary | back to summary |
|---|---|
| pack-priv static File findNativeLibrary() | |
| getResourceAsInputStream | back to summary |
|---|---|
| private static InputStream getResourceAsInputStream(String resourcePath) throws IOException | |
| getVersion | back to summary |
|---|---|
| public static String getVersion() Get the snappy-java version by reading pom.properties embedded in jar. This version data is used as a suffix of a dll file extracted from the jar.
| |
| hasResource | back to summary |
|---|---|
| private static boolean hasResource(String path) | |
| loadBitShuffleApi | back to summary |
|---|---|
| pack-priv static synchronized BitShuffleNative loadBitShuffleApi() | |
| loadNativeLibrary | back to summary |
|---|---|
| private static synchronized void loadNativeLibrary() Load a native library of snappy-java | |
| loadSnappyApi | back to summary |
|---|---|
| pack-priv static synchronized SnappyApi loadSnappyApi() | |
| loadSnappySystemProperties | back to summary |
|---|---|
| private static void loadSnappySystemProperties() load system properties when configuration file of the name
| |
| setSnappyApi | back to summary |
|---|---|
| pack-priv static synchronized void setSnappyApi(SnappyApi apiImpl) Set the `snappyApi` instance. | |