blob: 6c05031870fd8522b2fbc5a986c55441ff099c17 [file] [log] [blame]
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!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"/>
<title>Kudu C++ client API: include/kudu/client/schema.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<img id="MSearchSelect" src="search/search.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</div>
</li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<h1>include/kudu/client/schema.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span>
<a name="l00002"></a>00002 <span class="comment">// Licensed to the Apache Software Foundation (ASF) under one</span>
<a name="l00003"></a>00003 <span class="comment">// or more contributor license agreements. See the NOTICE file</span>
<a name="l00004"></a>00004 <span class="comment">// distributed with this work for additional information</span>
<a name="l00005"></a>00005 <span class="comment">// regarding copyright ownership. The ASF licenses this file</span>
<a name="l00006"></a>00006 <span class="comment">// to you under the Apache License, Version 2.0 (the</span>
<a name="l00007"></a>00007 <span class="comment">// &quot;License&quot;); you may not use this file except in compliance</span>
<a name="l00008"></a>00008 <span class="comment">// with the License. You may obtain a copy of the License at</span>
<a name="l00009"></a>00009 <span class="comment">//</span>
<a name="l00010"></a>00010 <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// Unless required by applicable law or agreed to in writing,</span>
<a name="l00013"></a>00013 <span class="comment">// software distributed under the License is distributed on an</span>
<a name="l00014"></a>00014 <span class="comment">// &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
<a name="l00015"></a>00015 <span class="comment">// KIND, either express or implied. See the License for the</span>
<a name="l00016"></a>00016 <span class="comment">// specific language governing permissions and limitations</span>
<a name="l00017"></a>00017 <span class="comment">// under the License.</span>
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef KUDU_CLIENT_SCHEMA_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_CLIENT_SCHEMA_H</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;kudu/client/value.h&quot;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;kudu/util/kudu_export.h&quot;</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="keyword">namespace </span>kudu {
<a name="l00028"></a>00028
<a name="l00029"></a>00029 <span class="keyword">class </span>ColumnSchema;
<a name="l00030"></a>00030 <span class="keyword">class </span>KuduPartialRow;
<a name="l00031"></a>00031 <span class="keyword">class </span>Schema;
<a name="l00032"></a>00032 <span class="keyword">class </span>TestWorkload;
<a name="l00033"></a>00033
<a name="l00034"></a>00034 <span class="keyword">namespace </span>tools {
<a name="l00035"></a>00035 <span class="keyword">class </span>RemoteKsckMaster;
<a name="l00036"></a>00036 <span class="keyword">class </span>ReplicaDumper;
<a name="l00037"></a>00037 }
<a name="l00038"></a>00038
<a name="l00039"></a>00039 <span class="keyword">namespace </span>client {
<a name="l00040"></a>00040
<a name="l00041"></a>00041 <span class="keyword">namespace </span>internal {
<a name="l00042"></a>00042 <span class="keyword">class </span>GetTableSchemaRpc;
<a name="l00043"></a>00043 <span class="keyword">class </span>LookupRpc;
<a name="l00044"></a>00044 <span class="keyword">class </span>MetaCacheEntry;
<a name="l00045"></a>00045 <span class="keyword">class </span>WriteRpc;
<a name="l00046"></a>00046 } <span class="comment">// namespace internal</span>
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <span class="keyword">class </span>KuduClient;
<a name="l00049"></a>00049 <span class="keyword">class </span>KuduSchema;
<a name="l00050"></a>00050 <span class="keyword">class </span>KuduSchemaBuilder;
<a name="l00051"></a>00051 <span class="keyword">class </span>KuduWriteOperation;
<a name="l00052"></a>00052
<a name="l00054"></a><a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html">00054</a> <span class="keyword">class </span>KUDU_EXPORT <a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html" title="Representation of column storage attributes.">KuduColumnStorageAttributes</a> {
<a name="l00055"></a>00055 <span class="keyword">public</span>:
<a name="l00057"></a><a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#aeb835a12e6f40b1a619afa8abd773b6d">00057</a> <span class="keyword">enum</span> <a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#aeb835a12e6f40b1a619afa8abd773b6d" title="Column encoding types.">EncodingType</a> {
<a name="l00058"></a>00058 AUTO_ENCODING = 0,
<a name="l00059"></a>00059 PLAIN_ENCODING = 1,
<a name="l00060"></a>00060 PREFIX_ENCODING = 2,
<a name="l00061"></a>00061 GROUP_VARINT = 3,
<a name="l00062"></a>00062 RLE = 4,
<a name="l00063"></a>00063 DICT_ENCODING = 5,
<a name="l00064"></a>00064 BIT_SHUFFLE = 6
<a name="l00065"></a>00065 };
<a name="l00066"></a>00066
<a name="l00068"></a><a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#af579406931a40daa5cb9e10603341a78">00068</a> <span class="keyword">enum</span> <a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#af579406931a40daa5cb9e10603341a78" title="Column compression types.">CompressionType</a> {
<a name="l00069"></a>00069 DEFAULT_COMPRESSION = 0,
<a name="l00070"></a>00070 NO_COMPRESSION = 1,
<a name="l00071"></a>00071 SNAPPY = 2,
<a name="l00072"></a>00072 LZ4 = 3,
<a name="l00073"></a>00073 ZLIB = 4,
<a name="l00074"></a>00074 };
<a name="l00075"></a>00075
<a name="l00076"></a>00076
<a name="l00088"></a><a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#a9bd5f6bce0a7369da5cd1f60341d1d71">00088</a> <a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html" title="Representation of column storage attributes.">KuduColumnStorageAttributes</a>(<a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#aeb835a12e6f40b1a619afa8abd773b6d" title="Column encoding types.">EncodingType</a> encoding = AUTO_ENCODING,
<a name="l00089"></a>00089 <a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#af579406931a40daa5cb9e10603341a78" title="Column compression types.">CompressionType</a> compression = DEFAULT_COMPRESSION,
<a name="l00090"></a>00090 int32_t block_size = 0)
<a name="l00091"></a>00091 : encoding_(encoding),
<a name="l00092"></a>00092 compression_(compression),
<a name="l00093"></a>00093 block_size_(block_size) {
<a name="l00094"></a>00094 }
<a name="l00095"></a>00095
<a name="l00097"></a><a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#acd93d52b48be7d87a0d3fd4500048f2e">00097</a> <span class="keyword">const</span> <a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#aeb835a12e6f40b1a619afa8abd773b6d" title="Column encoding types.">EncodingType</a> <a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#acd93d52b48be7d87a0d3fd4500048f2e">encoding</a>()<span class="keyword"> const </span>{
<a name="l00098"></a>00098 <span class="keywordflow">return</span> encoding_;
<a name="l00099"></a>00099 }
<a name="l00100"></a>00100
<a name="l00102"></a><a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#a00ef1e67c5fdd537d35f102748b1ad9d">00102</a> <span class="keyword">const</span> <a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#af579406931a40daa5cb9e10603341a78" title="Column compression types.">CompressionType</a> <a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#a00ef1e67c5fdd537d35f102748b1ad9d">compression</a>()<span class="keyword"> const </span>{
<a name="l00103"></a>00103 <span class="keywordflow">return</span> compression_;
<a name="l00104"></a>00104 }
<a name="l00105"></a>00105
<a name="l00107"></a>00107 std::string ToString() <span class="keyword">const</span>;
<a name="l00108"></a>00108
<a name="l00109"></a>00109 <span class="keyword">private</span>:
<a name="l00110"></a>00110 EncodingType encoding_;
<a name="l00111"></a>00111 CompressionType compression_;
<a name="l00112"></a>00112 int32_t block_size_;
<a name="l00113"></a>00113 };
<a name="l00114"></a>00114
<a name="l00116"></a><a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html">00116</a> <span class="keyword">class </span>KUDU_EXPORT <a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html" title="Representation of the column schema.">KuduColumnSchema</a> {
<a name="l00117"></a>00117 <span class="keyword">public</span>:
<a name="l00119"></a><a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html#aba69238e70af5c887a4fb11fa2a120c5">00119</a> <span class="keyword">enum</span> <a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html#aba69238e70af5c887a4fb11fa2a120c5" title="Supported data types for columns.">DataType</a> {
<a name="l00120"></a>00120 INT8 = 0,
<a name="l00121"></a>00121 INT16 = 1,
<a name="l00122"></a>00122 INT32 = 2,
<a name="l00123"></a>00123 INT64 = 3,
<a name="l00124"></a>00124 STRING = 4,
<a name="l00125"></a>00125 BOOL = 5,
<a name="l00126"></a>00126 FLOAT = 6,
<a name="l00127"></a>00127 DOUBLE = 7,
<a name="l00128"></a>00128 BINARY = 8,
<a name="l00129"></a>00129 UNIXTIME_MICROS = 9,
<a name="l00130"></a><a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html#aba69238e70af5c887a4fb11fa2a120c5a27d1b7aca7cf9a01d9258a41bbe3b505">00130</a> TIMESTAMP = UNIXTIME_MICROS
<a name="l00131"></a>00131 };
<a name="l00132"></a>00132
<a name="l00136"></a>00136 <span class="keyword">static</span> std::string DataTypeToString(DataType type);
<a name="l00137"></a>00137
<a name="l00154"></a>00154 <a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html" title="Representation of the column schema.">KuduColumnSchema</a>(<span class="keyword">const</span> std::string &amp;name,
<a name="l00155"></a>00155 DataType type,
<a name="l00156"></a>00156 <span class="keywordtype">bool</span> is_nullable = <span class="keyword">false</span>,
<a name="l00157"></a>00157 <span class="keyword">const</span> <span class="keywordtype">void</span>* default_value = NULL,
<a name="l00158"></a>00158 <a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html" title="Representation of column storage attributes.">KuduColumnStorageAttributes</a> attributes = <a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html" title="Representation of column storage attributes.">KuduColumnStorageAttributes</a>());
<a name="l00159"></a>00159
<a name="l00164"></a>00164 <a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html" title="Representation of the column schema.">KuduColumnSchema</a>(<span class="keyword">const</span> <a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html" title="Representation of the column schema.">KuduColumnSchema</a>&amp; other);
<a name="l00165"></a>00165 ~<a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html" title="Representation of the column schema.">KuduColumnSchema</a>();
<a name="l00166"></a>00166
<a name="l00172"></a>00172 <a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html" title="Representation of the column schema.">KuduColumnSchema</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html" title="Representation of the column schema.">KuduColumnSchema</a>&amp; other);
<a name="l00173"></a>00173
<a name="l00178"></a>00178 <span class="keywordtype">void</span> CopyFrom(<span class="keyword">const</span> <a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html" title="Representation of the column schema.">KuduColumnSchema</a>&amp; other);
<a name="l00179"></a>00179
<a name="l00185"></a>00185 <span class="keywordtype">bool</span> Equals(<span class="keyword">const</span> <a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html" title="Representation of the column schema.">KuduColumnSchema</a>&amp; other) <span class="keyword">const</span>;
<a name="l00186"></a>00186
<a name="l00193"></a>00193 <span class="keyword">const</span> std::string&amp; name() <span class="keyword">const</span>;
<a name="l00194"></a>00194
<a name="l00196"></a>00196 DataType type() <span class="keyword">const</span>;
<a name="l00197"></a>00197
<a name="l00199"></a>00199 <span class="keywordtype">bool</span> is_nullable() <span class="keyword">const</span>;
<a name="l00201"></a>00201
<a name="l00202"></a>00202 <span class="keyword">private</span>:
<a name="l00203"></a>00203 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>;
<a name="l00204"></a>00204 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a>;
<a name="l00205"></a>00205 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduSchemaBuilder.html" title="Builder API for constructing a KuduSchema object.">KuduSchemaBuilder</a>;
<a name="l00206"></a>00206 <span class="comment">// KuduTableAlterer::Data needs to be a friend. Friending the parent class</span>
<a name="l00207"></a>00207 <span class="comment">// is transitive to nested classes. See http://tiny.cloudera.com/jwtui</span>
<a name="l00208"></a>00208 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduTableAlterer.html" title="Alters an existing table based on the provided steps.">KuduTableAlterer</a>;
<a name="l00209"></a>00209
<a name="l00210"></a>00210 <a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html" title="Representation of the column schema.">KuduColumnSchema</a>();
<a name="l00211"></a>00211
<a name="l00212"></a>00212 <span class="comment">// Owned.</span>
<a name="l00213"></a>00213 ColumnSchema* col_;
<a name="l00214"></a>00214 };
<a name="l00215"></a>00215
<a name="l00224"></a><a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html">00224</a> <span class="keyword">class </span>KUDU_EXPORT <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a> {
<a name="l00225"></a>00225 <span class="keyword">public</span>:
<a name="l00237"></a>00237 <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>* Default(<a class="code" href="classkudu_1_1client_1_1KuduValue.html" title="A constant cell value with a specific type.">KuduValue</a>* value);
<a name="l00238"></a>00238
<a name="l00244"></a>00244 <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>* Compression(<a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#af579406931a40daa5cb9e10603341a78" title="Column compression types.">KuduColumnStorageAttributes::CompressionType</a> compression);
<a name="l00245"></a>00245
<a name="l00253"></a>00253 <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>* Encoding(<a class="code" href="classkudu_1_1client_1_1KuduColumnStorageAttributes.html#aeb835a12e6f40b1a619afa8abd773b6d" title="Column encoding types.">KuduColumnStorageAttributes::EncodingType</a> encoding);
<a name="l00254"></a>00254
<a name="l00274"></a>00274 <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>* BlockSize(int32_t block_size);
<a name="l00275"></a>00275
<a name="l00288"></a>00288 <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>* PrimaryKey();
<a name="l00289"></a>00289
<a name="l00295"></a>00295 <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>* NotNull();
<a name="l00296"></a>00296
<a name="l00302"></a>00302 <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>* Nullable();
<a name="l00303"></a>00303
<a name="l00311"></a>00311 <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>* Type(<a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html#aba69238e70af5c887a4fb11fa2a120c5" title="Supported data types for columns.">KuduColumnSchema::DataType</a> type);
<a name="l00313"></a>00313
<a name="l00323"></a>00323 <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>* RemoveDefault();
<a name="l00324"></a>00324
<a name="l00330"></a>00330 <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>* RenameTo(<span class="keyword">const</span> std::string&amp; new_name);
<a name="l00332"></a>00332
<a name="l00333"></a>00333 <span class="keyword">private</span>:
<a name="l00334"></a>00334 <span class="keyword">class </span>KUDU_NO_EXPORT Data;
<a name="l00335"></a>00335 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduSchemaBuilder.html" title="Builder API for constructing a KuduSchema object.">KuduSchemaBuilder</a>;
<a name="l00336"></a>00336 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduTableAlterer.html" title="Alters an existing table based on the provided steps.">KuduTableAlterer</a>;
<a name="l00337"></a>00337
<a name="l00338"></a>00338 <span class="comment">// This class should always be owned and deleted by one of its friends,</span>
<a name="l00339"></a>00339 <span class="comment">// not the user.</span>
<a name="l00340"></a>00340 ~<a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>();
<a name="l00341"></a>00341
<a name="l00342"></a>00342 <span class="keyword">explicit</span> <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>(<span class="keyword">const</span> std::string&amp; col_name);
<a name="l00343"></a>00343
<a name="l00344"></a>00344 <a class="code" href="classkudu_1_1Status.html" title="A representation of an operation&amp;#39;s outcome.">Status</a> ToColumnSchema(<a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html" title="Representation of the column schema.">KuduColumnSchema</a>* col) <span class="keyword">const</span>;
<a name="l00345"></a>00345
<a name="l00346"></a>00346 <span class="comment">// Owned.</span>
<a name="l00347"></a>00347 Data* data_;
<a name="l00348"></a>00348 };
<a name="l00349"></a>00349
<a name="l00371"></a><a class="code" href="classkudu_1_1client_1_1KuduSchemaBuilder.html">00371</a> <span class="keyword">class </span>KUDU_EXPORT <a class="code" href="classkudu_1_1client_1_1KuduSchemaBuilder.html" title="Builder API for constructing a KuduSchema object.">KuduSchemaBuilder</a> {
<a name="l00372"></a>00372 <span class="keyword">public</span>:
<a name="l00373"></a>00373 <a class="code" href="classkudu_1_1client_1_1KuduSchemaBuilder.html" title="Builder API for constructing a KuduSchema object.">KuduSchemaBuilder</a>();
<a name="l00374"></a>00374 ~<a class="code" href="classkudu_1_1client_1_1KuduSchemaBuilder.html" title="Builder API for constructing a KuduSchema object.">KuduSchemaBuilder</a>();
<a name="l00375"></a>00375
<a name="l00382"></a>00382 <a class="code" href="classkudu_1_1client_1_1KuduColumnSpec.html" title="Builder API for specifying or altering a column within a table schema.">KuduColumnSpec</a>* AddColumn(<span class="keyword">const</span> std::string&amp; name);
<a name="l00383"></a>00383
<a name="l00391"></a>00391 <a class="code" href="classkudu_1_1client_1_1KuduSchemaBuilder.html" title="Builder API for constructing a KuduSchema object.">KuduSchemaBuilder</a>* SetPrimaryKey(<span class="keyword">const</span> std::vector&lt;std::string&gt;&amp; key_col_names);
<a name="l00392"></a>00392
<a name="l00402"></a>00402 <a class="code" href="classkudu_1_1Status.html" title="A representation of an operation&amp;#39;s outcome.">Status</a> Build(<a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a>* schema);
<a name="l00403"></a>00403
<a name="l00404"></a>00404 <span class="keyword">private</span>:
<a name="l00405"></a>00405 <span class="keyword">class </span>KUDU_NO_EXPORT Data;
<a name="l00406"></a>00406 <span class="comment">// Owned.</span>
<a name="l00407"></a>00407 Data* data_;
<a name="l00408"></a>00408 };
<a name="l00409"></a>00409
<a name="l00411"></a><a class="code" href="classkudu_1_1client_1_1KuduSchema.html">00411</a> <span class="keyword">class </span>KUDU_EXPORT <a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a> {
<a name="l00412"></a>00412 <span class="keyword">public</span>:
<a name="l00413"></a>00413 <a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a>();
<a name="l00414"></a>00414
<a name="l00419"></a>00419 <a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a>(<span class="keyword">const</span> <a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a>&amp; other);
<a name="l00420"></a>00420 ~<a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a>();
<a name="l00421"></a>00421
<a name="l00428"></a>00428 <a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a>&amp; other);
<a name="l00429"></a>00429 <span class="keywordtype">void</span> CopyFrom(<span class="keyword">const</span> <a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a>&amp; other);
<a name="l00431"></a>00431
<a name="l00441"></a>00441 <a class="code" href="classkudu_1_1Status.html" title="A representation of an operation&amp;#39;s outcome.">Status</a> Reset(<span class="keyword">const</span> std::vector&lt;KuduColumnSchema&gt;&amp; columns, <span class="keywordtype">int</span> key_columns)
<a name="l00442"></a>00442 WARN_UNUSED_RESULT;
<a name="l00443"></a>00443
<a name="l00450"></a>00450 <span class="keywordtype">bool</span> Equals(<span class="keyword">const</span> <a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a>&amp; other) <span class="keyword">const</span>;
<a name="l00451"></a>00451
<a name="l00455"></a>00455 <a class="code" href="classkudu_1_1client_1_1KuduColumnSchema.html" title="Representation of the column schema.">KuduColumnSchema</a> Column(<span class="keywordtype">size_t</span> idx) <span class="keyword">const</span>;
<a name="l00456"></a>00456
<a name="l00458"></a>00458 <span class="keywordtype">size_t</span> num_columns() <span class="keyword">const</span>;
<a name="l00459"></a>00459
<a name="l00468"></a>00468 <span class="keywordtype">void</span> GetPrimaryKeyColumnIndexes(std::vector&lt;int&gt;* indexes) <span class="keyword">const</span>;
<a name="l00469"></a>00469
<a name="l00477"></a>00477 <a class="code" href="classkudu_1_1KuduPartialRow.html" title="A row which may only contain values for a subset of the columns.">KuduPartialRow</a>* NewRow() <span class="keyword">const</span>;
<a name="l00478"></a>00478
<a name="l00479"></a>00479 <span class="keyword">private</span>:
<a name="l00480"></a>00480 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduClient.html" title="A handle for a connection to a cluster.">KuduClient</a>;
<a name="l00481"></a>00481 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduScanner.html" title="This class is a representation of a single scan.">KuduScanner</a>;
<a name="l00482"></a>00482 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduScanToken.html" title="A scan descriptor limited to a single physical contiguous location.">KuduScanToken</a>;
<a name="l00483"></a>00483 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduScanTokenBuilder.html" title="Builds scan tokens for a table.">KuduScanTokenBuilder</a>;
<a name="l00484"></a>00484 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduSchemaBuilder.html" title="Builder API for constructing a KuduSchema object.">KuduSchemaBuilder</a>;
<a name="l00485"></a>00485 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduTable.html" title="A representation of a table on a particular cluster.">KuduTable</a>;
<a name="l00486"></a>00486 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduTableCreator.html" title="A helper class to create a new table with the desired options.">KuduTableCreator</a>;
<a name="l00487"></a>00487 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkudu_1_1client_1_1KuduWriteOperation.html" title="A single-row write operation to be sent to a Kudu table.">KuduWriteOperation</a>;
<a name="l00488"></a>00488 <span class="keyword">friend</span> <span class="keyword">class </span>ScanConfiguration;
<a name="l00489"></a>00489 <span class="keyword">friend</span> <span class="keyword">class </span>internal::GetTableSchemaRpc;
<a name="l00490"></a>00490 <span class="keyword">friend</span> <span class="keyword">class </span>internal::LookupRpc;
<a name="l00491"></a>00491 <span class="keyword">friend</span> <span class="keyword">class </span>internal::MetaCacheEntry;
<a name="l00492"></a>00492 <span class="keyword">friend</span> <span class="keyword">class </span>internal::WriteRpc;
<a name="l00493"></a>00493 <span class="keyword">friend</span> <span class="keyword">class </span>tools::RemoteKsckMaster;
<a name="l00494"></a>00494 <span class="keyword">friend</span> <span class="keyword">class </span>tools::ReplicaDumper;
<a name="l00495"></a>00495
<a name="l00496"></a>00496 <span class="keyword">friend</span> <a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a> KuduSchemaFromSchema(<span class="keyword">const</span> Schema&amp; schema);
<a name="l00497"></a>00497
<a name="l00498"></a>00498
<a name="l00499"></a>00499 <span class="comment">// For use by kudu tests.</span>
<a name="l00500"></a>00500 <span class="keyword">explicit</span> <a class="code" href="classkudu_1_1client_1_1KuduSchema.html" title="A representation of a table&amp;#39;s schema.">KuduSchema</a>(<span class="keyword">const</span> Schema&amp; schema);
<a name="l00501"></a>00501
<a name="l00502"></a>00502 <span class="comment">// Private since we don&apos;t want users to rely on the first N columns</span>
<a name="l00503"></a>00503 <span class="comment">// being the keys.</span>
<a name="l00504"></a>00504 <span class="keywordtype">size_t</span> num_key_columns() <span class="keyword">const</span>;
<a name="l00505"></a>00505
<a name="l00506"></a>00506 <span class="comment">// Owned.</span>
<a name="l00507"></a>00507 Schema* schema_;
<a name="l00508"></a>00508 };
<a name="l00509"></a>00509
<a name="l00510"></a>00510 } <span class="comment">// namespace client</span>
<a name="l00511"></a>00511 } <span class="comment">// namespace kudu</span>
<a name="l00512"></a>00512 <span class="preprocessor">#endif // KUDU_CLIENT_SCHEMA_H</span>
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<!-- start footer part -->
<hr class="footer"/>
<address class="footer">
<small>Generated for Kudu version 1.0.1 on Tue Oct 11 08:52:01 2016 by Doxygen 1.6.1</small>
<br>
<small>Copyright © 2016 The Apache Software Foundation.</small>
</address>
</body>
</html>