本文整理了Java中org.xerial.snappy.Snappy.getNativeLibraryVersion()
方法的一些代码示例,展示了Snappy.getNativeLibraryVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Snappy.getNativeLibraryVersion()
方法的具体详情如下:
包路径:org.xerial.snappy.Snappy
类名称:Snappy
方法名:getNativeLibraryVersion
[英]Get the native library version of the snappy
[中]获取snappy的本机库版本
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
private SnappyCompressor() {
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by the calling method
Snappy.getNativeLibraryVersion();
}
代码示例来源:origin: jsevellec/cassandra-unit
private SnappyCompressor()
{
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by the calling method
Snappy.getNativeLibraryVersion();
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
public static SnappyCompressor create(Map<String, String> compressionOptions)
{
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by calling method
Snappy.getNativeLibraryVersion();
// no specific options supported so far
return instance;
}
代码示例来源:origin: jsevellec/cassandra-unit
public static SnappyCompressor create(Map<String, String> compressionOptions)
{
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by calling method
Snappy.getNativeLibraryVersion();
// no specific options supported so far
return instance;
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
private SnappyCompressor()
{
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by the calling method
Snappy.getNativeLibraryVersion();
}
代码示例来源:origin: com.yugabyte/cassandra-driver-core
private SnappyCompressor() {
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by the calling method
Snappy.getNativeLibraryVersion();
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
private SnappyCompressor() {
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by the calling method
Snappy.getNativeLibraryVersion();
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-server
private SnappyCompressor()
{
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by the calling method
Snappy.getNativeLibraryVersion();
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-server
public static SnappyCompressor create(Map<String, String> compressionOptions)
{
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by calling method
Snappy.getNativeLibraryVersion();
// no specific options supported so far
return instance;
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
private SnappyCompressor() {
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by the calling method
Snappy.getNativeLibraryVersion();
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
public static SnappyCompressor create(Map<String, String> compressionOptions)
{
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by calling method
Snappy.getNativeLibraryVersion();
// no specific options supported so far
return instance;
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
private SnappyCompressor()
{
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by the calling method
Snappy.getNativeLibraryVersion();
}
代码示例来源:origin: com.stratio.cassandra/cassandra-driver-core
private SnappyCompressor() {
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by the calling method
Snappy.getNativeLibraryVersion();
}
代码示例来源:origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra
public static SnappyCompressor create(Map<String, String> compressionOptions)
{
// this would throw java.lang.NoClassDefFoundError if Snappy class
// wasn't found at runtime which should be processed by calling method
Snappy.getNativeLibraryVersion();
// no specific options supported so far
return instance;
}
代码示例来源:origin: com.datastax.oss/java-driver-core-shaded
public SnappyCompressor(@SuppressWarnings("unused") DriverContext context) {
try {
Snappy.getNativeLibraryVersion();
} catch (NoClassDefFoundError e) {
throw new IllegalStateException(
"Error initializing compressor, make sure that the Snappy library is in the classpath "
+ "(the driver declares it as an optional dependency, "
+ "so you need to declare it explicitly)",
e);
}
}
代码示例来源:origin: org.apache.geode/gemfire-core
/**
* Create a new instance of the SnappyCompressor.
*
* @throws IllegaltStateException when the Snappy native library is unavailable
*/
public SnappyCompressor() {
synchronized (defaultInstance) {
if (!nativeLibraryLoaded) {
try {
String s = Snappy.getNativeLibraryVersion();
System.out.println(s);
} catch (SnappyError se) {
throw new IllegalStateException(LocalizedStrings.SnappyCompressor_UNABLE_TO_LOAD_NATIVE_SNAPPY_LIBRARY.toLocalizedString(), se);
}
nativeLibraryLoaded = true;
}
}
}
代码示例来源:origin: asakusafw/asakusafw
@Override
protected void configure() {
if (isEnabled() == false) {
LOG.debug("snappy configurator is disabled."); //$NON-NLS-1$
return;
}
// Preloads native snappy library.
MacSnappyJavaWorkaround.install();
Snappy.getNativeLibraryVersion();
}
代码示例来源:origin: io.snappydata/gemfire-core
/**
* Create a new instance of the SnappyCompressor.
*
* @throws IllegaltStateException when the Snappy native library is unavailable
*/
@SuppressFBWarnings(value="DMI_RANDOM_USED_ONLY_ONCE", justification="The native library is only used once so we only need to generate one random number")
public SnappyCompressor() {
synchronized (defaultInstance) {
if (!nativeLibraryLoaded) {
try {
SnappyUtils.setSnappySystemProperties(SnappyUtils.getOrCreateLogWriter());
Snappy.getNativeLibraryVersion();
} catch (SnappyError se) {
throw new IllegalStateException(LocalizedStrings.SnappyCompressor_UNABLE_TO_LOAD_NATIVE_SNAPPY_LIBRARY.toLocalizedString(), se);
}
nativeLibraryLoaded = true;
}
}
}
代码示例来源:origin: asakusafw/asakusafw
private void doIo(int count) throws IOException {
Snappy.getNativeLibraryVersion();
代码示例来源:origin: asakusafw/asakusafw
/**
* Writes {@link NullWritable}s.
* @throws Exception if failed
*/
@Test
public void null_entry() throws Exception {
// eagerly initializes snappy
Snappy.getNativeLibraryVersion();
File file = folder.newFile();
try (ModelOutput<NullWritable> out = new TemporaryFileOutput<>(
new BufferedOutputStream(new FileOutputStream(file)),
NullWritable.class.getName(),
1024,
256 * 1024)) {
out.write(NullWritable.get());
out.write(NullWritable.get());
out.write(NullWritable.get());
}
try (TemporaryFileInput<NullWritable> in = new TemporaryFileInput<>(
new BufferedInputStream(new FileInputStream(file)),
0)) {
assertThat(in.readTo(NullWritable.get()), is(true));
assertThat(in.readTo(NullWritable.get()), is(true));
assertThat(in.readTo(NullWritable.get()), is(true));
assertThat(in.readTo(NullWritable.get()), is(false));
}
}
内容来源于网络,如有侵权,请联系作者删除!