blob: 3ef63d03894c994509ffd06818d15dcfb5ac6f52 [file] [log] [blame]
<!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"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Impala: impala::BufferedBlockMgr::Block Class Reference</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="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.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 style="padding-left: 0.5em;">
<div id="projectname">Impala
</div>
<div id="projectbrief">Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.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)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</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('classimpala_1_1BufferedBlockMgr_1_1Block.html','');});
</script>
<div id="doc-content">
<!-- 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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classimpala_1_1BufferedBlockMgr_1_1Block-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">impala::BufferedBlockMgr::Block Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for impala::BufferedBlockMgr::Block:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="classimpala_1_1BufferedBlockMgr_1_1Block__inherit__graph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
</div>
<div class="dynheader">
Collaboration diagram for impala::BufferedBlockMgr::Block:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="classimpala_1_1BufferedBlockMgr_1_1Block__coll__graph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1d46ffe7b416a949b6fdb6e7828c3301"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a1d46ffe7b416a949b6fdb6e7828c3301">Pin</a> (<a class="el" href="classbool.html">bool</a> *pinned, <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *release_block=NULL, <a class="el" href="classbool.html">bool</a> unpin=true)</td></tr>
<tr class="separator:a1d46ffe7b416a949b6fdb6e7828c3301"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03ad00fa7c792f4fc85ba5e573a30369"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a03ad00fa7c792f4fc85ba5e573a30369">Unpin</a> ()</td></tr>
<tr class="separator:a03ad00fa7c792f4fc85ba5e573a30369"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98ac414f60e71a25c45ec2526c5bcf87"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a98ac414f60e71a25c45ec2526c5bcf87">Delete</a> ()</td></tr>
<tr class="separator:a98ac414f60e71a25c45ec2526c5bcf87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99b13bc2126e2dc8badc46a569cfb8e5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a99b13bc2126e2dc8badc46a569cfb8e5">AddRow</a> ()</td></tr>
<tr class="separator:a99b13bc2126e2dc8badc46a569cfb8e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f1e51ff5ab49e2114c837398671b071"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a0f1e51ff5ab49e2114c837398671b071">num_rows</a> () const </td></tr>
<tr class="separator:a0f1e51ff5ab49e2114c837398671b071"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9e943bc0fae320e955500d0cd74a293"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ae9e943bc0fae320e955500d0cd74a293"><td class="memTemplItemLeft" align="right" valign="top">T *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#ae9e943bc0fae320e955500d0cd74a293">Allocate</a> (int size)</td></tr>
<tr class="memdesc:ae9e943bc0fae320e955500d0cd74a293"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates the specified number of bytes from this block. <a href="#ae9e943bc0fae320e955500d0cd74a293">More...</a><br/></td></tr>
<tr class="separator:ae9e943bc0fae320e955500d0cd74a293"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05732338103987ffd309abee740d56a8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a05732338103987ffd309abee740d56a8">BytesRemaining</a> () const </td></tr>
<tr class="memdesc:a05732338103987ffd309abee740d56a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of remaining bytes that can be allocated in this block. <a href="#a05732338103987ffd309abee740d56a8">More...</a><br/></td></tr>
<tr class="separator:a05732338103987ffd309abee740d56a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a471d38f75ad1ef978ea60f31e391d47e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a471d38f75ad1ef978ea60f31e391d47e">ReturnAllocation</a> (int size)</td></tr>
<tr class="memdesc:a471d38f75ad1ef978ea60f31e391d47e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return size bytes from the most recent allocation. <a href="#a471d38f75ad1ef978ea60f31e391d47e">More...</a><br/></td></tr>
<tr class="separator:a471d38f75ad1ef978ea60f31e391d47e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3beba257e3649515dd06d31a42667d5e"><td class="memItemLeft" align="right" valign="top">uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a3beba257e3649515dd06d31a42667d5e">buffer</a> () const </td></tr>
<tr class="separator:a3beba257e3649515dd06d31a42667d5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e27fd2bf12a0f46eaea29de635b231a"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a9e27fd2bf12a0f46eaea29de635b231a">valid_data_len</a> () const </td></tr>
<tr class="memdesc:a9e27fd2bf12a0f46eaea29de635b231a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of bytes allocated in this block. <a href="#a9e27fd2bf12a0f46eaea29de635b231a">More...</a><br/></td></tr>
<tr class="separator:a9e27fd2bf12a0f46eaea29de635b231a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19e6454922bcb1a9c8a1a0e4b0020076"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a19e6454922bcb1a9c8a1a0e4b0020076">buffer_len</a> () const </td></tr>
<tr class="separator:a19e6454922bcb1a9c8a1a0e4b0020076"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6eaa4369a88f027db9e0e484fd158e6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#ac6eaa4369a88f027db9e0e484fd158e6">is_max_size</a> () const </td></tr>
<tr class="separator:ac6eaa4369a88f027db9e0e484fd158e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a678a5f46ff6c1f21cd6409c44fd8e52d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a678a5f46ff6c1f21cd6409c44fd8e52d">is_pinned</a> () const </td></tr>
<tr class="separator:a678a5f46ff6c1f21cd6409c44fd8e52d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa53f27958871d6fb11225fac7da8a2de"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#aa53f27958871d6fb11225fac7da8a2de">DebugString</a> () const </td></tr>
<tr class="memdesc:aa53f27958871d6fb11225fac7da8a2de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Debug helper method to print the state of a block. <a href="#aa53f27958871d6fb11225fac7da8a2de">More...</a><br/></td></tr>
<tr class="separator:aa53f27958871d6fb11225fac7da8a2de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a509c8676cbcf1c4a1aea4075c3c469c7"><td class="memItemLeft" align="right" valign="top">T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structimpala_1_1InternalQueue_1_1Node.html#a509c8676cbcf1c4a1aea4075c3c469c7">Next</a> () const </td></tr>
<tr class="memdesc:a509c8676cbcf1c4a1aea4075c3c469c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the Next/Prev node or NULL if this is the end/front. <a href="#a509c8676cbcf1c4a1aea4075c3c469c7">More...</a><br/></td></tr>
<tr class="separator:a509c8676cbcf1c4a1aea4075c3c469c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ed10cff8d74c3d63f3235ad6a29dcd2"><td class="memItemLeft" align="right" valign="top">T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structimpala_1_1InternalQueue_1_1Node.html#a4ed10cff8d74c3d63f3235ad6a29dcd2">Prev</a> () const </td></tr>
<tr class="separator:a4ed10cff8d74c3d63f3235ad6a29dcd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:acc28055c6976b7b7979572f7f2554065"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#acc28055c6976b7b7979572f7f2554065">Block</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> *block_mgr)</td></tr>
<tr class="separator:acc28055c6976b7b7979572f7f2554065"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a225d09b43de0ec9aa6d727a054d034a7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a225d09b43de0ec9aa6d727a054d034a7">Init</a> ()</td></tr>
<tr class="memdesc:a225d09b43de0ec9aa6d727a054d034a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the state of a block and set the number of bytes allocated to 0. <a href="#a225d09b43de0ec9aa6d727a054d034a7">More...</a><br/></td></tr>
<tr class="separator:a225d09b43de0ec9aa6d727a054d034a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a7f4c0ec69a48806af60dbe5457837f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a9a7f4c0ec69a48806af60dbe5457837f">Validate</a> () const </td></tr>
<tr class="separator:a9a7f4c0ec69a48806af60dbe5457837f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a0988f68d7a28513af7c87a14b9494d7f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1BufferDescriptor.html">BufferDescriptor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a0988f68d7a28513af7c87a14b9494d7f">buffer_desc_</a></td></tr>
<tr class="separator:a0988f68d7a28513af7c87a14b9494d7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7073784f40755a243b4b0feec3177989"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a7073784f40755a243b4b0feec3177989">block_mgr_</a></td></tr>
<tr class="memdesc:a7073784f40755a243b4b0feec3177989"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parent block manager object. Responsible for maintaining the state of the block. <a href="#a7073784f40755a243b4b0feec3177989">More...</a><br/></td></tr>
<tr class="separator:a7073784f40755a243b4b0feec3177989"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af101e58c9293bfd555da560bf6108f4c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#af101e58c9293bfd555da560bf6108f4c">client_</a></td></tr>
<tr class="memdesc:af101e58c9293bfd555da560bf6108f4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The client that owns this block. <a href="#af101e58c9293bfd555da560bf6108f4c">More...</a><br/></td></tr>
<tr class="separator:af101e58c9293bfd555da560bf6108f4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cfb659c9d42d3244a5ad364ae429f65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1DiskIoMgr_1_1WriteRange.html">DiskIoMgr::WriteRange</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a3cfb659c9d42d3244a5ad364ae429f65">write_range_</a></td></tr>
<tr class="separator:a3cfb659c9d42d3244a5ad364ae429f65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf498dbd8d39e17a7a6009093e10a21f"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#abf498dbd8d39e17a7a6009093e10a21f">valid_data_len_</a></td></tr>
<tr class="memdesc:abf498dbd8d39e17a7a6009093e10a21f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Length of valid (i.e. allocated) data within the block. <a href="#abf498dbd8d39e17a7a6009093e10a21f">More...</a><br/></td></tr>
<tr class="separator:abf498dbd8d39e17a7a6009093e10a21f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace9778913ab978a887b7f7092841f75f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#ace9778913ab978a887b7f7092841f75f">num_rows_</a></td></tr>
<tr class="memdesc:ace9778913ab978a887b7f7092841f75f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of rows in this block. <a href="#ace9778913ab978a887b7f7092841f75f">More...</a><br/></td></tr>
<tr class="separator:ace9778913ab978a887b7f7092841f75f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7edf1456f8b8387c576894223bcba51a"><td class="memItemLeft" align="right" valign="top">boost::scoped_array&lt; uint8_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a7edf1456f8b8387c576894223bcba51a">encrypted_write_buffer_</a></td></tr>
<tr class="separator:a7edf1456f8b8387c576894223bcba51a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1ee9f87bdd38df1dfcecf8ba1b2fc26"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#ae1ee9f87bdd38df1dfcecf8ba1b2fc26">key_</a> [32]</td></tr>
<tr class="memdesc:ae1ee9f87bdd38df1dfcecf8ba1b2fc26"><td class="mdescLeft">&#160;</td><td class="mdescRight">If encryption_ is on, a AES 256-bit key. Regenerated on each write. <a href="#ae1ee9f87bdd38df1dfcecf8ba1b2fc26">More...</a><br/></td></tr>
<tr class="separator:ae1ee9f87bdd38df1dfcecf8ba1b2fc26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65ec47fa107545f44e0088bec963aeab"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a65ec47fa107545f44e0088bec963aeab">iv_</a> [AES_BLOCK_SIZE]</td></tr>
<tr class="separator:a65ec47fa107545f44e0088bec963aeab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1678b167da24899ad4adbb2a0b4a286b"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a1678b167da24899ad4adbb2a0b4a286b">hash_</a> [SHA256_DIGEST_LENGTH]</td></tr>
<tr class="separator:a1678b167da24899ad4adbb2a0b4a286b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeca62eb216d7c466faa19926b2a6aa3b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#aeca62eb216d7c466faa19926b2a6aa3b">is_pinned_</a></td></tr>
<tr class="memdesc:aeca62eb216d7c466faa19926b2a6aa3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">is_pinned_ is true while the block is pinned by a client. <a href="#aeca62eb216d7c466faa19926b2a6aa3b">More...</a><br/></td></tr>
<tr class="separator:aeca62eb216d7c466faa19926b2a6aa3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a827d453cd204c0ec92964d1cecf7369b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a827d453cd204c0ec92964d1cecf7369b">in_write_</a></td></tr>
<tr class="separator:a827d453cd204c0ec92964d1cecf7369b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5089ae246e8e767b5b770629abee3a19"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a5089ae246e8e767b5b770629abee3a19">is_deleted_</a></td></tr>
<tr class="memdesc:a5089ae246e8e767b5b770629abee3a19"><td class="mdescLeft">&#160;</td><td class="mdescRight">True if the block is deleted by the client. <a href="#a5089ae246e8e767b5b770629abee3a19">More...</a><br/></td></tr>
<tr class="separator:a5089ae246e8e767b5b770629abee3a19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5da55f7a691c542a208af013fe5e7306"><td class="memItemLeft" align="right" valign="top">boost::condition_variable&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a5da55f7a691c542a208af013fe5e7306">write_complete_cv_</a></td></tr>
<tr class="separator:a5da55f7a691c542a208af013fe5e7306"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab5f6ba25bab9147d3cc30c30943a26e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#aab5f6ba25bab9147d3cc30c30943a26e">client_local_</a></td></tr>
<tr class="separator:aab5f6ba25bab9147d3cc30c30943a26e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:aaf94fa91fbf3650fc5a2608ee2d64827"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#aaf94fa91fbf3650fc5a2608ee2d64827">BufferedBlockMgr</a></td></tr>
<tr class="separator:aaf94fa91fbf3650fc5a2608ee2d64827"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A fixed-size block of data that may be be persisted to disk. The state of the block is maintained by the block manager and is described by 3 bools: is_pinned_ = True if the block is pinned. The block has a non-null buffer_desc_, buffer_desc_ cannot be in the free buffer list and the block cannot be in unused_blocks_ or unpinned_blocks_. Newly allocated blocks are pinned. in_write_ = True if a write has been issued but not completed for this block. The block cannot be in the unpinned_blocks_ and must have a non-null buffer_desc_ that's not in the free buffer list. It may be pinned or unpinned. is_deleted_ = True if <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a98ac414f60e71a25c45ec2526c5bcf87">Delete()</a> has been called on a block. After this, no API call is valid on the block. <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a1d46ffe7b416a949b6fdb6e7828c3301">Pin()</a> and <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a03ad00fa7c792f4fc85ba5e573a30369">Unpin()</a> can be invoked on a block any number of times before <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a98ac414f60e71a25c45ec2526c5bcf87">Delete()</a>. When a pinned block is unpinned for the first time, it is added to the unpinned_blocks_ list and its buffer is removed from the free list. If it is pinned or deleted at any time while it is on the unpinned list, it is simply removed from that list. When it is dequeued from that list and enqueued for writing, in_write_ is set to true. The block may be pinned, unpinned or deleted while in_write_ is true. After the write has completed, the block's buffer will be returned to the free buffer list if it is no longer pinned, and the block itself will be put on the unused blocks list if <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a98ac414f60e71a25c45ec2526c5bcf87">Delete()</a> was called. A block MUST have a non-null buffer_desc_ if a) is_pinned_ is true (i.e. the client is using it), or b) in_write_ is true, (i.e. IO mgr is using it), or c) It is on the unpinned list (buffer has not been persisted.) In addition to the block manager API, <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> exposes <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#ae9e943bc0fae320e955500d0cd74a293" title="Allocates the specified number of bytes from this block. ">Allocate()</a>, <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a471d38f75ad1ef978ea60f31e391d47e" title="Return size bytes from the most recent allocation. ">ReturnAllocation()</a> and <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a05732338103987ffd309abee740d56a8" title="Return the number of remaining bytes that can be allocated in this block. ">BytesRemaining()</a> to allocate and free memory within a block, and <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a3beba257e3649515dd06d31a42667d5e">buffer()</a> and <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a9e27fd2bf12a0f46eaea29de635b231a" title="Return the number of bytes allocated in this block. ">valid_data_len()</a> to read/write the contents of a block. These are not thread-safe. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00136">136</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="acc28055c6976b7b7979572f7f2554065"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">impala::BufferedBlockMgr::Block::Block </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> *&#160;</td>
<td class="paramname"><em>block_mgr</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00113">113</a> of file <a class="el" href="buffered-block-mgr_8cc_source.html">buffered-block-mgr.cc</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a99b13bc2126e2dc8badc46a569cfb8e5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void impala::BufferedBlockMgr::Block::AddRow </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00156">156</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>References <a class="el" href="buffered-block-mgr_8h_source.html#l00242">num_rows_</a>.</p>
<p>Referenced by <a class="el" href="buffered-tuple-stream_8inline_8h_source.html#l00034">impala::BufferedTupleStream::AllocateRow()</a>, and <a class="el" href="buffered-tuple-stream-ir_8cc_source.html#l00032">impala::BufferedTupleStream::DeepCopyInternal()</a>.</p>
</div>
</div>
<a class="anchor" id="ae9e943bc0fae320e955500d0cd74a293"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">T* impala::BufferedBlockMgr::Block::Allocate </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>size</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Allocates the specified number of bytes from this block. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00160">160</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>References <a class="el" href="buffered-block-mgr_8h_source.html#l00397">impala::BufferedBlockMgr::BufferDescriptor::buffer</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00222">buffer_desc_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00168">BytesRemaining()</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00239">valid_data_len_</a>.</p>
<p>Referenced by <a class="el" href="sorter_8cc_source.html#l00372">impala::Sorter::Run::AddBatch()</a>, <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00124">impala::BufferedBlockMgrTest::AllocateBlocks()</a>, <a class="el" href="buffered-tuple-stream_8inline_8h_source.html#l00034">impala::BufferedTupleStream::AllocateRow()</a>, <a class="el" href="buffered-tuple-stream-ir_8cc_source.html#l00032">impala::BufferedTupleStream::DeepCopyInternal()</a>, <a class="el" href="hash-table_8cc_source.html#l00345">impala::HashTable::GrowNodeArray()</a>, <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00085">impala::BufferedBlockMgrTest::MakeRandomSizeData()</a>, <a class="el" href="buffered-tuple-stream_8cc_source.html#l00178">impala::BufferedTupleStream::NewBlockForWrite()</a>, and <a class="el" href="sorter_8cc_source.html#l00478">impala::Sorter::Run::UnpinAllBlocks()</a>.</p>
</div>
</div>
<a class="anchor" id="a3beba257e3649515dd06d31a42667d5e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint8_t* impala::BufferedBlockMgr::Block::buffer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Pointer to start of the block data in memory. Only guaranteed to be valid if the block is pinned. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00181">181</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>References <a class="el" href="buffered-block-mgr_8h_source.html#l00397">impala::BufferedBlockMgr::BufferDescriptor::buffer</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00222">buffer_desc_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l01239">impala::BufferedBlockMgr::Decrypt()</a>, <a class="el" href="buffered-tuple-stream-ir_8cc_source.html#l00032">impala::BufferedTupleStream::DeepCopyInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01183">impala::BufferedBlockMgr::Encrypt()</a>, <a class="el" href="sorter_8cc_source.html#l00609">impala::Sorter::Run::GetNext()</a>, <a class="el" href="buffered-tuple-stream_8cc_source.html#l00178">impala::BufferedTupleStream::NewBlockForWrite()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">impala::BufferedBlockMgr::PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01275">impala::BufferedBlockMgr::SetHash()</a>, <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00297">impala::TEST_F()</a>, <a class="el" href="sorter_8cc_source.html#l00478">impala::Sorter::Run::UnpinAllBlocks()</a>, <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00080">impala::BufferedBlockMgrTest::ValidateBlock()</a>, <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00100">impala::BufferedBlockMgrTest::ValidateRandomSizeData()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01290">impala::BufferedBlockMgr::VerifyHash()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">impala::BufferedBlockMgr::WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a19e6454922bcb1a9c8a1a0e4b0020076"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int64_t impala::BufferedBlockMgr::Block::buffer_len </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the length of the underlying buffer. Only callable if the block is pinned. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00191">191</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>References <a class="el" href="buffered-block-mgr_8h_source.html#l00222">buffer_desc_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00203">is_pinned()</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00400">impala::BufferedBlockMgr::BufferDescriptor::len</a>.</p>
</div>
</div>
<a class="anchor" id="a05732338103987ffd309abee740d56a8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int impala::BufferedBlockMgr::Block::BytesRemaining </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the number of remaining bytes that can be allocated in this block. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00168">168</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>References <a class="el" href="buffered-block-mgr_8h_source.html#l00222">buffer_desc_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00400">impala::BufferedBlockMgr::BufferDescriptor::len</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00239">valid_data_len_</a>.</p>
<p>Referenced by <a class="el" href="sorter_8cc_source.html#l00372">impala::Sorter::Run::AddBatch()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00160">Allocate()</a>, <a class="el" href="buffered-tuple-stream_8inline_8h_source.html#l00034">impala::BufferedTupleStream::AllocateRow()</a>, <a class="el" href="buffered-tuple-stream-ir_8cc_source.html#l00032">impala::BufferedTupleStream::DeepCopyInternal()</a>, <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00339">impala::TEST_F()</a>, and <a class="el" href="sorter_8cc_source.html#l00478">impala::Sorter::Run::UnpinAllBlocks()</a>.</p>
</div>
</div>
<a class="anchor" id="aa53f27958871d6fb11225fac7da8a2de"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string impala::BufferedBlockMgr::Block::DebugString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Debug helper method to print the state of a block. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00168">168</a> of file <a class="el" href="buffered-block-mgr_8cc_source.html">buffered-block-mgr.cc</a>.</p>
<p>Referenced by <a class="el" href="buffered-tuple-stream-ir_8cc_source.html#l00032">impala::BufferedTupleStream::DeepCopyInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">impala::BufferedBlockMgr::DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">impala::BufferedBlockMgr::FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">impala::BufferedBlockMgr::GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">impala::BufferedBlockMgr::PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00828">impala::BufferedBlockMgr::ReturnUnusedBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">impala::BufferedBlockMgr::UnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">impala::BufferedBlockMgr::Validate()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">impala::BufferedBlockMgr::WriteComplete()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">impala::BufferedBlockMgr::WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a98ac414f60e71a25c45ec2526c5bcf87"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classimpala_1_1Status.html">Status</a> impala::BufferedBlockMgr::Block::Delete </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Delete a block. Its buffer is released and on-disk location can be over-written. Non-blocking. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00130">130</a> of file <a class="el" href="buffered-block-mgr_8cc_source.html">buffered-block-mgr.cc</a>.</p>
<p>Referenced by <a class="el" href="sorter_8cc_source.html#l00468">impala::Sorter::Run::DeleteAllBlocks()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00528">impala::BufferedBlockMgr::DeleteOrUnpinBlock()</a>, <a class="el" href="sorter_8cc_source.html#l01054">impala::Sorter::MergeIntermediateRuns()</a>, <a class="el" href="buffered-tuple-stream_8cc_source.html#l00248">impala::BufferedTupleStream::NextBlockForRead()</a>, <a class="el" href="sorter_8cc_source.html#l01006">impala::Sorter::SortRun()</a>, <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00507">impala::TEST_F()</a>, and <a class="el" href="sorter_8cc_source.html#l00478">impala::Sorter::Run::UnpinAllBlocks()</a>.</p>
</div>
</div>
<a class="anchor" id="a225d09b43de0ec9aa6d727a054d034a7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void impala::BufferedBlockMgr::Block::Init </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize the state of a block and set the number of bytes allocated to 0. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00134">134</a> of file <a class="el" href="buffered-block-mgr_8cc_source.html">buffered-block-mgr.cc</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00979">impala::BufferedBlockMgr::GetUnusedBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00828">impala::BufferedBlockMgr::ReturnUnusedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="ac6eaa4369a88f027db9e0e484fd158e6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classbool.html">bool</a> impala::BufferedBlockMgr::Block::is_max_size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if this block is the max block size. Only callable if the block is pinned. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00198">198</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>References <a class="el" href="buffered-block-mgr_8h_source.html#l00225">block_mgr_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00222">buffer_desc_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00203">is_pinned()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00400">impala::BufferedBlockMgr::BufferDescriptor::len</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00386">impala::BufferedBlockMgr::max_block_size()</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">impala::BufferedBlockMgr::DeleteBlock()</a>, <a class="el" href="buffered-tuple-stream_8cc_source.html#l00178">impala::BufferedTupleStream::NewBlockForWrite()</a>, <a class="el" href="buffered-tuple-stream_8cc_source.html#l00248">impala::BufferedTupleStream::NextBlockForRead()</a>, and <a class="el" href="buffered-tuple-stream_8cc_source.html#l00168">impala::BufferedTupleStream::UnpinBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a678a5f46ff6c1f21cd6409c44fd8e52d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classbool.html">bool</a> impala::BufferedBlockMgr::Block::is_pinned </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00203">203</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>References <a class="el" href="buffered-block-mgr_8h_source.html#l00270">is_pinned_</a>.</p>
<p>Referenced by <a class="el" href="buffered-tuple-stream_8inline_8h_source.html#l00034">impala::BufferedTupleStream::AllocateRow()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00191">buffer_len()</a>, <a class="el" href="buffered-tuple-stream-ir_8cc_source.html#l00032">impala::BufferedTupleStream::DeepCopyInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">impala::BufferedBlockMgr::GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00198">is_max_size()</a>, <a class="el" href="buffered-tuple-stream_8cc_source.html#l00178">impala::BufferedTupleStream::NewBlockForWrite()</a>, <a class="el" href="buffered-tuple-stream_8cc_source.html#l00314">impala::BufferedTupleStream::PrepareForRead()</a>, <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00297">impala::TEST_F()</a>, <a class="el" href="buffered-tuple-stream_8cc_source.html#l00168">impala::BufferedTupleStream::UnpinBlock()</a>, and <a class="el" href="buffered-tuple-stream_8cc_source.html#l00396">impala::BufferedTupleStream::UnpinStream()</a>.</p>
</div>
</div>
<a class="anchor" id="a509c8676cbcf1c4a1aea4075c3c469c7"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">T* <a class="el" href="classimpala_1_1InternalQueue.html">impala::InternalQueue</a>&lt; T &gt;::Node::Next </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the Next/Prev node or NULL if this is the end/front. </p>
<p>Definition at line <a class="el" href="internal-queue_8h_source.html#l00048">48</a> of file <a class="el" href="internal-queue_8h_source.html">internal-queue.h</a>.</p>
<p>References <a class="el" href="internal-queue_8h_source.html#l00251">impala::InternalQueue&lt; T &gt;::lock_</a>, <a class="el" href="internal-queue_8h_source.html#l00062">impala::InternalQueue&lt; T &gt;::Node::next</a>, and <a class="el" href="internal-queue_8h_source.html#l00061">impala::InternalQueue&lt; T &gt;::Node::parent_queue</a>.</p>
<p>Referenced by <a class="el" href="internal-queue-test_8cc_source.html#l00034">impala::TEST()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">impala::BufferedBlockMgr::Validate()</a>.</p>
</div>
</div>
<a class="anchor" id="a0f1e51ff5ab49e2114c837398671b071"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int impala::BufferedBlockMgr::Block::num_rows </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00157">157</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>References <a class="el" href="buffered-block-mgr_8h_source.html#l00242">num_rows_</a>.</p>
<p>Referenced by <a class="el" href="buffered-tuple-stream_8cc_source.html#l00178">impala::BufferedTupleStream::NewBlockForWrite()</a>.</p>
</div>
</div>
<a class="anchor" id="a1d46ffe7b416a949b6fdb6e7828c3301"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classimpala_1_1Status.html">Status</a> impala::BufferedBlockMgr::Block::Pin </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classbool.html">bool</a> *&#160;</td>
<td class="paramname"><em>pinned</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>release_block</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classbool.html">bool</a>&#160;</td>
<td class="paramname"><em>unpin</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Pins a block in memory&ndash;assigns a free buffer to a block and reads it from disk if necessary. If there are no free blocks and no unpinned blocks, '*pinned' is set to false and the block is not pinned. If 'release_block' is non-NULL, if there is memory pressure, this block will be pinned using the buffer from 'release_block'. If 'unpin' is true, 'release_block' will be unpinned (regardless of whether or not the buffer was used for this block). If 'unpin' is false, 'release_block' is deleted. 'release_block' must be pinned. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00122">122</a> of file <a class="el" href="buffered-block-mgr_8cc_source.html">buffered-block-mgr.cc</a>.</p>
<p>Referenced by <a class="el" href="sorter_8cc_source.html#l00609">impala::Sorter::Run::GetNext()</a>.</p>
</div>
</div>
<a class="anchor" id="a4ed10cff8d74c3d63f3235ad6a29dcd2"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">T* <a class="el" href="classimpala_1_1InternalQueue.html">impala::InternalQueue</a>&lt; T &gt;::Node::Prev </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="internal-queue_8h_source.html#l00052">52</a> of file <a class="el" href="internal-queue_8h_source.html">internal-queue.h</a>.</p>
<p>References <a class="el" href="internal-queue_8h_source.html#l00251">impala::InternalQueue&lt; T &gt;::lock_</a>, <a class="el" href="internal-queue_8h_source.html#l00061">impala::InternalQueue&lt; T &gt;::Node::parent_queue</a>, and <a class="el" href="internal-queue_8h_source.html#l00063">impala::InternalQueue&lt; T &gt;::Node::prev</a>.</p>
<p>Referenced by <a class="el" href="internal-queue-test_8cc_source.html#l00034">impala::TEST()</a>.</p>
</div>
</div>
<a class="anchor" id="a471d38f75ad1ef978ea60f31e391d47e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void impala::BufferedBlockMgr::Block::ReturnAllocation </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>size</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return size bytes from the most recent allocation. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00174">174</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>References <a class="el" href="buffered-block-mgr_8h_source.html#l00239">valid_data_len_</a>.</p>
<p>Referenced by <a class="el" href="sorter_8cc_source.html#l00372">impala::Sorter::Run::AddBatch()</a>, and <a class="el" href="buffered-tuple-stream-ir_8cc_source.html#l00032">impala::BufferedTupleStream::DeepCopyInternal()</a>.</p>
</div>
</div>
<a class="anchor" id="a03ad00fa7c792f4fc85ba5e573a30369"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classimpala_1_1Status.html">Status</a> impala::BufferedBlockMgr::Block::Unpin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Unpins a block by adding it to the list of unpinned blocks maintained by the block manager. An unpinned block must be flushed before its buffer is released or assigned to a different block. Is non-blocking. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00126">126</a> of file <a class="el" href="buffered-block-mgr_8cc_source.html">buffered-block-mgr.cc</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00528">impala::BufferedBlockMgr::DeleteOrUnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">impala::BufferedBlockMgr::GetNewBlock()</a>, <a class="el" href="sorter_8cc_source.html#l01054">impala::Sorter::MergeIntermediateRuns()</a>, <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00454">impala::TEST_F()</a>, <a class="el" href="sorter_8cc_source.html#l00478">impala::Sorter::Run::UnpinAllBlocks()</a>, and <a class="el" href="buffered-tuple-stream_8cc_source.html#l00168">impala::BufferedTupleStream::UnpinBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a9e27fd2bf12a0f46eaea29de635b231a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int64_t impala::BufferedBlockMgr::Block::valid_data_len </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the number of bytes allocated in this block. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00187">187</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>References <a class="el" href="buffered-block-mgr_8h_source.html#l00239">valid_data_len_</a>.</p>
<p>Referenced by <a class="el" href="sorter_8cc_source.html#l00609">impala::Sorter::Run::GetNext()</a>, <a class="el" href="sorter_8cc_source.html#l01054">impala::Sorter::MergeIntermediateRuns()</a>, <a class="el" href="sorter_8cc_source.html#l01006">impala::Sorter::SortRun()</a>, <a class="el" href="sorter_8cc_source.html#l00478">impala::Sorter::Run::UnpinAllBlocks()</a>, <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00080">impala::BufferedBlockMgrTest::ValidateBlock()</a>, and <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00100">impala::BufferedBlockMgrTest::ValidateRandomSizeData()</a>.</p>
</div>
</div>
<a class="anchor" id="a9a7f4c0ec69a48806af60dbe5457837f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classbool.html">bool</a> impala::BufferedBlockMgr::Block::Validate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Debug helper method to validate the state of a block. block_mgr_ lock must already be taken. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00144">144</a> of file <a class="el" href="buffered-block-mgr_8cc_source.html">buffered-block-mgr.cc</a>.</p>
<p>References <a class="el" href="buffered-block-mgr_8cc_source.html#l01082">impala::BufferedBlockMgr::DebugString()</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">impala::BufferedBlockMgr::DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">impala::BufferedBlockMgr::FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">impala::BufferedBlockMgr::GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">impala::BufferedBlockMgr::UnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">impala::BufferedBlockMgr::Validate()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">impala::BufferedBlockMgr::WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="aaf94fa91fbf3650fc5a2608ee2d64827"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">friend class <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00209">209</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a7073784f40755a243b4b0feec3177989"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a>* impala::BufferedBlockMgr::Block::block_mgr_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Parent block manager object. Responsible for maintaining the state of the block. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00225">225</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8h_source.html#l00198">is_max_size()</a>.</p>
</div>
</div>
<a class="anchor" id="a0988f68d7a28513af7c87a14b9494d7f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1BufferDescriptor.html">BufferDescriptor</a>* impala::BufferedBlockMgr::Block::buffer_desc_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Pointer to the buffer associated with the block. NULL if the block is not in memory and cannot be changed while the block is pinned or being written. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00222">222</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8h_source.html#l00160">Allocate()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00181">buffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00191">buffer_len()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00168">BytesRemaining()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00278">impala::BufferedBlockMgr::ConsumeMemory()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">impala::BufferedBlockMgr::DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">impala::BufferedBlockMgr::FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">impala::BufferedBlockMgr::GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00198">is_max_size()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">impala::BufferedBlockMgr::PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00828">impala::BufferedBlockMgr::ReturnUnusedBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">impala::BufferedBlockMgr::TransferBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">impala::BufferedBlockMgr::UnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">impala::BufferedBlockMgr::Validate()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">impala::BufferedBlockMgr::WriteComplete()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">impala::BufferedBlockMgr::WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="af101e58c9293bfd555da560bf6108f4c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a>* impala::BufferedBlockMgr::Block::client_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The client that owns this block. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00228">228</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">impala::BufferedBlockMgr::DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">impala::BufferedBlockMgr::FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">impala::BufferedBlockMgr::GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00979">impala::BufferedBlockMgr::GetUnusedBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">impala::BufferedBlockMgr::PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">impala::BufferedBlockMgr::UnpinBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">impala::BufferedBlockMgr::WriteComplete()</a>.</p>
</div>
</div>
<a class="anchor" id="aab5f6ba25bab9147d3cc30c30943a26e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classbool.html">bool</a> impala::BufferedBlockMgr::Block::client_local_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>If true, this block is being written out so the underlying buffer can be transferred to another block from the same client. We don't want this buffer getting picked up by another client. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00288">288</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">impala::BufferedBlockMgr::TransferBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">impala::BufferedBlockMgr::WriteComplete()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">impala::BufferedBlockMgr::WriteUnpinnedBlocks()</a>.</p>
</div>
</div>
<a class="anchor" id="a7edf1456f8b8387c576894223bcba51a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">boost::scoped_array&lt;uint8_t&gt; impala::BufferedBlockMgr::Block::encrypted_write_buffer_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>If encryption_ is on, in the write path we allocate a new buffer to hold encrypted data while it's being written to disk. The read path, having no references to the data, can be decrypted in place. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00247">247</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l01183">impala::BufferedBlockMgr::Encrypt()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01233">impala::BufferedBlockMgr::EncryptDone()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l01275">impala::BufferedBlockMgr::SetHash()</a>.</p>
</div>
</div>
<a class="anchor" id="a1678b167da24899ad4adbb2a0b4a286b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint8_t impala::BufferedBlockMgr::Block::hash_[SHA256_DIGEST_LENGTH]</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>If integrity_ is on, our SHA256 hash of the data being written. Filled in on writes; verified on reads. This is calculated <em>after</em> encryption. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00263">263</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l01275">impala::BufferedBlockMgr::SetHash()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l01290">impala::BufferedBlockMgr::VerifyHash()</a>.</p>
</div>
</div>
<a class="anchor" id="a827d453cd204c0ec92964d1cecf7369b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classbool.html">bool</a> impala::BufferedBlockMgr::Block::in_write_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>in_write_ is set to true when the block is enqueued for writing via <a class="el" href="classimpala_1_1DiskIoMgr.html">DiskIoMgr</a>, and set to false when the write is complete. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00274">274</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">impala::BufferedBlockMgr::DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01183">impala::BufferedBlockMgr::Encrypt()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">impala::BufferedBlockMgr::FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">impala::BufferedBlockMgr::PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">impala::BufferedBlockMgr::TransferBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">impala::BufferedBlockMgr::UnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">impala::BufferedBlockMgr::Validate()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">impala::BufferedBlockMgr::WriteComplete()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">impala::BufferedBlockMgr::WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a5089ae246e8e767b5b770629abee3a19"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classbool.html">bool</a> impala::BufferedBlockMgr::Block::is_deleted_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>True if the block is deleted by the client. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00277">277</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">impala::BufferedBlockMgr::DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">impala::BufferedBlockMgr::FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">impala::BufferedBlockMgr::GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">impala::BufferedBlockMgr::PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00828">impala::BufferedBlockMgr::ReturnUnusedBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">impala::BufferedBlockMgr::TransferBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">impala::BufferedBlockMgr::UnpinBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">impala::BufferedBlockMgr::WriteComplete()</a>.</p>
</div>
</div>
<a class="anchor" id="aeca62eb216d7c466faa19926b2a6aa3b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classbool.html">bool</a> impala::BufferedBlockMgr::Block::is_pinned_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>is_pinned_ is true while the block is pinned by a client. </p>
<p><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> state variables. The block's buffer can be freed only if is_pinned_ and in_write_ are both false. TODO: this might be better expressed as an enum. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00270">270</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">impala::BufferedBlockMgr::DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01183">impala::BufferedBlockMgr::Encrypt()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">impala::BufferedBlockMgr::FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">impala::BufferedBlockMgr::GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00203">is_pinned()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">impala::BufferedBlockMgr::PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00828">impala::BufferedBlockMgr::ReturnUnusedBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">impala::BufferedBlockMgr::TransferBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">impala::BufferedBlockMgr::UnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">impala::BufferedBlockMgr::Validate()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">impala::BufferedBlockMgr::WriteComplete()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">impala::BufferedBlockMgr::WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a65ec47fa107545f44e0088bec963aeab"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint8_t impala::BufferedBlockMgr::Block::iv_[AES_BLOCK_SIZE]</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>If encryption_ is on, the IV to use. IV stands for Initialization Vector, and is used as an input to the cipher as the "block to supply before the
first block of plaintext". This is required because all ciphers (except the weak ECB) are built such that each block depends on the output from the previous block. Since the first block doesn't have a previous block, we supply this IV. Think of it as starting off the chain of encryption. This IV is also regenerated on each write. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00259">259</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l01239">impala::BufferedBlockMgr::Decrypt()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l01183">impala::BufferedBlockMgr::Encrypt()</a>.</p>
</div>
</div>
<a class="anchor" id="ae1ee9f87bdd38df1dfcecf8ba1b2fc26"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint8_t impala::BufferedBlockMgr::Block::key_[32]</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>If encryption_ is on, a AES 256-bit key. Regenerated on each write. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00250">250</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l01239">impala::BufferedBlockMgr::Decrypt()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l01183">impala::BufferedBlockMgr::Encrypt()</a>.</p>
</div>
</div>
<a class="anchor" id="ace9778913ab978a887b7f7092841f75f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int impala::BufferedBlockMgr::Block::num_rows_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Number of rows in this block. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00242">242</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8h_source.html#l00156">AddRow()</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00157">num_rows()</a>.</p>
</div>
</div>
<a class="anchor" id="abf498dbd8d39e17a7a6009093e10a21f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int64_t impala::BufferedBlockMgr::Block::valid_data_len_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Length of valid (i.e. allocated) data within the block. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00239">239</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8h_source.html#l00160">Allocate()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00168">BytesRemaining()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01239">impala::BufferedBlockMgr::Decrypt()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01183">impala::BufferedBlockMgr::Encrypt()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">impala::BufferedBlockMgr::PinBlock()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00174">ReturnAllocation()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01275">impala::BufferedBlockMgr::SetHash()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00187">valid_data_len()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01290">impala::BufferedBlockMgr::VerifyHash()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">impala::BufferedBlockMgr::WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a5da55f7a691c542a208af013fe5e7306"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">boost::condition_variable impala::BufferedBlockMgr::Block::write_complete_cv_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Condition variable for when there is a specific client waiting for this block. Only used if client_local_ is true. TODO: Currently we use block_mgr_-&gt;lock_ for this condvar. There is no reason to use that lock_ that is already overloaded, see IMPALA-1883. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00283">283</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">impala::BufferedBlockMgr::TransferBuffer()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">impala::BufferedBlockMgr::WriteComplete()</a>.</p>
</div>
</div>
<a class="anchor" id="a3cfb659c9d42d3244a5ad364ae429f65"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classimpala_1_1DiskIoMgr_1_1WriteRange.html">DiskIoMgr::WriteRange</a>* impala::BufferedBlockMgr::Block::write_range_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>WriteRange object representing the on-disk location used to persist a block. Is created the first time a block is persisted, and retained until the block object is destroyed. The file location and offset in write_range_ are valid throughout the lifetime of this object, but the data and length in the write_range_ are only valid while the block is being written. write_range_ instance is owned by the block manager. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00236">236</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">impala::BufferedBlockMgr::PinBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">impala::BufferedBlockMgr::WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>be/src/runtime/<a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a></li>
<li>be/src/runtime/<a class="el" href="buffered-block-mgr_8cc_source.html">buffered-block-mgr.cc</a></li>
</ul>
</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="namespaceimpala.html">impala</a></li><li class="navelem"><a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a></li><li class="navelem"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a></li>
<li class="footer">Generated on Thu May 7 2015 16:10:49 for Impala by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
</ul>
</div>
</body>
</html>