-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhelium.html
165 lines (165 loc) · 10.8 KB
/
helium.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>WiredTiger: WiredTiger Helium support</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="wiredtiger.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><a href="http://wiredtiger.com/"><img alt="Logo" src="LogoFinal-header.png" alt="WiredTiger" /></a></td>
<td style="padding-left: 0.5em;">
<div id="projectname">
 <span id="projectnumber">Version 2.8.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="banner">
<a href="https://github.com/wiredtiger/wiredtiger">Fork me on GitHub</a>
<a class="last" href="http://groups.google.com/group/wiredtiger-users">Join my user group</a>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li><a href="community.html"><span>Community</span></a></li>
<li><a href="license.html"><span>License</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('helium.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">WiredTiger Helium support </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>WiredTiger supports Levyx Inc., Helium Data Store volumes as a data-source.</p>
<p>To configure one or more Helium volumes as WiredTiger data sources, take the following steps.</p>
<h1><a class="anchor" id="helium_build"></a>
Building the WiredTiger Helium Support</h1>
<p>To build the Helium support, use the configuration option <code>–with-helium=DIR</code>. For example:</p>
<div class="fragment"><div class="line">% cd wiredtiger</div>
<div class="line">% ls /usr/local/lib/Helium</div>
<div class="line">Helium Programmer<span class="stringliteral">'s Reference.pdf libhe.a</span></div>
<div class="line"><span class="stringliteral">README.TXT libhe.so</span></div>
<div class="line"><span class="stringliteral">he.h</span></div>
<div class="line"><span class="stringliteral">% ./configure --with-helium=/usr/local/lib/Helium && make</span></div>
</div><!-- fragment --><h1><a class="anchor" id="helium_load"></a>
Loading the WiredTiger Helium Support</h1>
<p>Next, add code to your application to load the Helium shared library.</p>
<p>The following example loads the Helium shared library, configuring and naming two separate Helium volumes. The first volume is named <code>dev1</code>, the second volume is named <code>dev2</code>. Volume <code>dev1</code> has two underlying physical Helium devices, <code>/dev/disk3s1</code> and <code>/dev/disk4s1</code>. Volume <code>dev2</code> has a single underlying physical Helium device, <code>/dev/disk5s1</code>.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#define HELIUM_LIBRARY_PATH "test/helium/.libs/libwiredtiger_helium.so""</span></div>
<div class="line">ret = connection-><a class="code" href="struct_w_t___c_o_n_n_e_c_t_i_o_n.html#ab6a56facfd217e5ff687aa4c012e8d68">load_extension</a>(connection, HELIUM_LIBRARY_PATH,</div>
<div class="line"> <span class="stringliteral">"config=["</span></div>
<div class="line"> <span class="stringliteral">"dev1=[helium_devices=[\"he://.//dev/disk3s1,/dev/disk4s1\"],"</span></div>
<div class="line"> <span class="stringliteral">"helium_o_volume_truncate=1],"</span></div>
<div class="line"> <span class="stringliteral">"dev2=[helium_devices=[\"he://.//dev/disk5s1\"],"</span></div>
<div class="line"> <span class="stringliteral">"helium_o_volume_truncate=1]]"</span>);</div>
</div><!-- fragment --><p>The <code>helium_devices</code> configuration string takes a WiredTiger string which is a comma-separated list of Helium devices. (Note the quoting required for that to be possible.)</p>
<p>In this example, both Helium volumes are configured to be truncated when first opened, and all previously existing contents discarded.</p>
<p>When configuring a Helium volume, the following non-standard configuration strings are supported:</p>
<table class="doxtable">
<tr>
<th>String</th><th>Type</th><th>Meaning </th></tr>
<tr>
<td>helium_devices</td><td>list</td><td>WiredTiger URI to Helium volume mapping </td></tr>
<tr>
<td>helium_env_read_cache_size</td><td>int</td><td>struct he_env read_cache_size value </td></tr>
<tr>
<td>helium_env_write_cache_size</td><td>int</td><td>struct he_env write_cache_size value </td></tr>
<tr>
<td>helium_o_volume_truncate</td><td>boolean</td><td>HE_O_VOLUME_TRUNCATE flag </td></tr>
</table>
<p>With the exception of the configuration string <code>helium_devices</code> (which is WiredTiger specific), see the Helium documentation for details on their use.</p>
<h1><a class="anchor" id="helium_objects"></a>
Creating WiredTiger objects on Helium volumes</h1>
<p>When creating WiredTiger objects on Helium volumes, the volume names are used as part of the URI specified to WiredTiger methods such as <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb" title="Create a table, column group, index or file. ">WT_SESSION::create</a> or <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a1d24b02549009f78b7c6463da0247614" title="Rename an object. ">WT_SESSION::rename</a>, separated from the object name by a single slash character.</p>
<p>Additionally, the <code>helium</code> <code>type</code> configuration string must be included.</p>
<p>The following example creates a table named <code>access</code> on the Helium volume <code>dev1</code>, and then opens a cursor on the table:</p>
<div class="fragment"><div class="line"><a class="code" href="struct_w_t___c_u_r_s_o_r.html">WT_CURSOR</a> *cursor;</div>
<div class="line"><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session;</div>
<div class="line"></div>
<div class="line"><span class="comment">/* Create the access table. */</span></div>
<div class="line">ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb">create</a>(</div>
<div class="line"> session, <span class="stringliteral">"table:dev1/access"</span>, <span class="stringliteral">"key_format=S,value_format=S,type=helium"</span>);</div>
<div class="line"></div>
<div class="line"><span class="comment">/* Open a cursor on the access table. */</span></div>
<div class="line">ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d">open_cursor</a>(session, <span class="stringliteral">"table:dev1/access"</span>, NULL, NULL, &cursor);</div>
</div><!-- fragment --><p>When calling <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb" title="Create a table, column group, index or file. ">WT_SESSION::create</a> to create an object on a Helium volume, the following additional configuration strings are supported:</p>
<table class="doxtable">
<tr>
<th>String</th><th>Type</th><th>Meaning </th></tr>
<tr>
<td>helium_o_compress</td><td>boolean</td><td>HE_I_COMPRESS flag </td></tr>
<tr>
<td>helium_o_truncate</td><td>boolean</td><td>HE_O_TRUNCATE flag </td></tr>
</table>
<p>See the Helium device documentation for details on their use.</p>
<p>For example, creating and truncating a table could be done as follows:</p>
<div class="fragment"><div class="line"><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html">WT_SESSION</a> *session;</div>
<div class="line"></div>
<div class="line"><span class="comment">/* Create and truncate the access table. */</span></div>
<div class="line">ret = session-><a class="code" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb">create</a>(session, <span class="stringliteral">"table:dev1/access"</span>,</div>
<div class="line"> <span class="stringliteral">"key_format=S,value_format=S,type=helium,helium_o_truncate=1"</span>);</div>
</div><!-- fragment --><h1><a class="anchor" id="helium_notes"></a>
Helium notes</h1>
<ul>
<li>Helium volumes do not support database backups.</li>
<li>Helium volumes do not support named checkpoints.</li>
<li>Helium volumes do not support compression of any kind.</li>
<li>Helium volumes do not support bulk load as a special case, and configuring cursors for bulk load has no effect.</li>
<li>Inserting a new record after the current maximum record in a fixed-length bit field column-store (that is, a store with an 'r' type key and 't' type value) does not implicitly create the missing records.</li>
</ul>
<h1><a class="anchor" id="helium_limitations"></a>
Helium limitations</h1>
<ul>
<li>WiredTiger transactions cannot include operations on both Helium volumes and other stores; this will be corrected in a future release. </li>
</ul>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="index.html">Reference Guide</a></li><li class="navelem"><a class="el" href="programming.html">Writing WiredTiger applications</a></li>
<li class="footer">Copyright (c) 2008-2016 MongoDB, Inc. All rights reserved. Contact <a href="mailto:[email protected]">[email protected]</a> for more information.</li>
</ul>
</div>
</body>
</html>