diff options
author | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-10-24 15:26:37 +1100 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-10-24 15:28:10 +1100 |
commit | 0609d0ce2ef563d7a4cde77d46396fe5c92c6df1 (patch) | |
tree | 1fc47f23e3cfd91c91182468dce8fee02082b49b /src/third_party/wiredtiger/examples | |
parent | ab1ee41ecf1c96ae8b17a2b1da1c7ee9b8c58676 (diff) | |
download | mongo-0609d0ce2ef563d7a4cde77d46396fe5c92c6df1.tar.gz |
Import wiredtiger: ef9a7983ea47cea78400a4472a3d4e46735385c5 from branch mongodb-3.4
ref: 6a31c2118c..ef9a7983ea
for: 3.4.0-rc2
WT-1592 Add ability to dump detailed cache information via statistics
WT-2403 Enhance random cursor implementation for LSM trees
WT-2880 Add support for Zstandard compression
WT-2904 Fix a bug where the reported checkpoint size could be many times data size
WT-2949 Add an option to wtperf to not close connection on shutdown
WT-2954 Inserting multi-megabyte values can cause large in-memory pages
WT-2955 Add statistics tracking the amount of time threads spend waiting for high level locks
WT-2956 utility tests -h option is always overridden by the default setup
WT-2959 Ensure WT_SESSION_IMPL is never used before it's initialized
WT-2963 Race setting max_entries during eviction
WT-2965 test_wt2323_join_visibility can hang on OSX
WT-2974 lint
WT-2976 Add a statistic tracking how long application threads spend doing I/O
WT-2977 Csuite LSM Random test can occasionally fail
WT-2985 Race during checkpoint can cause a core dump
WT-2987 Fix a bug where opening a cursor on an incomplete table drops core
WT-2988 Fix a bug where __wt_epoch potentially returns garbage values.
Diffstat (limited to 'src/third_party/wiredtiger/examples')
-rw-r--r-- | src/third_party/wiredtiger/examples/c/ex_all.c | 33 | ||||
-rw-r--r-- | src/third_party/wiredtiger/examples/java/com/wiredtiger/examples/ex_all.java | 29 |
2 files changed, 62 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/examples/c/ex_all.c b/src/third_party/wiredtiger/examples/c/ex_all.c index a2042c22bbb..ea646604a76 100644 --- a/src/third_party/wiredtiger/examples/c/ex_all.c +++ b/src/third_party/wiredtiger/examples/c/ex_all.c @@ -611,6 +611,13 @@ session_ops(WT_SESSION *session) "block_compressor=zlib,key_format=S,value_format=S"); /*! [Create a zlib compressed table] */ ret = session->drop(session, "table:mytable", NULL); + + /*! [Create a zstd compressed table] */ + ret = session->create(session, + "table:mytable", + "block_compressor=zstd,key_format=S,value_format=S"); + /*! [Create a zstd compressed table] */ + ret = session->drop(session, "table:mytable", NULL); #endif /*! [Configure checksums to uncompressed] */ @@ -1108,6 +1115,32 @@ main(void) if (ret == 0) (void)conn->close(conn, NULL); + /*! [Configure zlib extension with compression level] */ + ret = wiredtiger_open(home, NULL, + "create," + "extensions=[/usr/local/lib/" + "libwiredtiger_zlib.so=[config=[compression_level=3]]]", &conn); + /*! [Configure zlib extension with compression level] */ + if (ret == 0) + (void)conn->close(conn, NULL); + + /*! [Configure zstd extension] */ + ret = wiredtiger_open(home, NULL, + "create," + "extensions=[/usr/local/lib/libwiredtiger_zstd.so]", &conn); + /*! [Configure zstd extension] */ + if (ret == 0) + (void)conn->close(conn, NULL); + + /*! [Configure zstd extension with compression level] */ + ret = wiredtiger_open(home, NULL, + "create," + "extensions=[/usr/local/lib/" + "libwiredtiger_zstd.so=[config=[compression_level=9]]]", &conn); + /*! [Configure zstd extension with compression level] */ + if (ret == 0) + (void)conn->close(conn, NULL); + /* * This example code gets run, and direct I/O might not be available, * causing the open to fail. The documentation requires code snippets, diff --git a/src/third_party/wiredtiger/examples/java/com/wiredtiger/examples/ex_all.java b/src/third_party/wiredtiger/examples/java/com/wiredtiger/examples/ex_all.java index 83a37e9a6a5..cf8491aa4f8 100644 --- a/src/third_party/wiredtiger/examples/java/com/wiredtiger/examples/ex_all.java +++ b/src/third_party/wiredtiger/examples/java/com/wiredtiger/examples/ex_all.java @@ -549,6 +549,12 @@ session_ops(Session session) "block_compressor=zlib,key_format=S,value_format=S"); /*! [Create a zlib compressed table] */ ret = session.drop("table:mytable", null); + + /*! [Create a zstd compressed table] */ + ret = session.create("table:mytable", + "block_compressor=zstd,key_format=S,value_format=S"); + /*! [Create a zstd compressed table] */ + ret = session.drop("table:mytable", null); } // if (false) /*! [Configure checksums to uncompressed] */ @@ -942,6 +948,29 @@ allExample() /*! [Configure zlib extension] */ conn.close(null); + /*! [Configure zlib extension with compression level] */ + conn = wiredtiger.open(home, + "create," + + "extensions=[/usr/local/lib/" + + "libwiredtiger_zlib.so=[config=[compression_level=3]]]"); + /*! [Configure zlib extension with compression level] */ + conn.close(null); + + /*! [Configure zstd extension] */ + conn = wiredtiger.open(home, + "create," + + "extensions=[/usr/local/lib/libwiredtiger_zstd.so]"); + /*! [Configure zstd extension] */ + conn.close(null); + + /*! [Configure zstd extension with compression level] */ + conn = wiredtiger.open(home, + "create," + + "extensions=[/usr/local/lib/" + + "libwiredtiger_zstd.so=[config=[compression_level=9]]]"); + /*! [Configure zstd extension with compression level] */ + conn.close(null); + /* * This example code gets run, and direct I/O might not be available, * causing the open to fail. The documentation requires code snippets, |