blob: c6468db6f5a469aa9d17da5ac1781d26aa59d181 [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 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.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="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-types">Private Types</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#pri-static-attribs">Static Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classimpala_1_1BufferedBlockMgr-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">impala::BufferedBlockMgr 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">
Collaboration diagram for impala::BufferedBlockMgr:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="classimpala_1_1BufferedBlockMgr__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="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><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">Block</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1BufferDescriptor.html">BufferDescriptor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Descriptor for a single memory buffer in the pool. <a href="structimpala_1_1BufferedBlockMgr_1_1BufferDescriptor.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:a65cb8755b19bbfb34a1e0f6d1a4fc8e0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a65cb8755b19bbfb34a1e0f6d1a4fc8e0">~BufferedBlockMgr</a> ()</td></tr>
<tr class="separator:a65cb8755b19bbfb34a1e0f6d1a4fc8e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52bd5a104f158068d4627f8451dcde76"><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.html#a52bd5a104f158068d4627f8451dcde76">RegisterClient</a> (int num_reserved_buffers, <a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> *<a class="el" href="expr-benchmark_8cc.html#ad327327fa716227ff7993880cbc4698f">tracker</a>, <a class="el" href="classimpala_1_1RuntimeState.html">RuntimeState</a> *state, <a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> **client)</td></tr>
<tr class="separator:a52bd5a104f158068d4627f8451dcde76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25a5078b6ff96b4bc78dd59ebe447919"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a25a5078b6ff96b4bc78dd59ebe447919">ClearReservations</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client)</td></tr>
<tr class="memdesc:a25a5078b6ff96b4bc78dd59ebe447919"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears all reservations for this client. <a href="#a25a5078b6ff96b4bc78dd59ebe447919">More...</a><br/></td></tr>
<tr class="separator:a25a5078b6ff96b4bc78dd59ebe447919"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9b3d1904de97e5829b8d8fe880ba506"><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.html#aa9b3d1904de97e5829b8d8fe880ba506">TryAcquireTmpReservation</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client, int num_buffers)</td></tr>
<tr class="separator:aa9b3d1904de97e5829b8d8fe880ba506"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae78494b85f739b709f17404b31cce793"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#ae78494b85f739b709f17404b31cce793">ClearTmpReservation</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client)</td></tr>
<tr class="memdesc:ae78494b85f739b709f17404b31cce793"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets tmp reservation to 0 on this client. <a href="#ae78494b85f739b709f17404b31cce793">More...</a><br/></td></tr>
<tr class="separator:ae78494b85f739b709f17404b31cce793"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4ddea92960294d8f764c2974fe273f9"><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.html#ac4ddea92960294d8f764c2974fe273f9">GetNewBlock</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client, <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *unpin_block, <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> **block, int64_t len=-1)</td></tr>
<tr class="separator:ac4ddea92960294d8f764c2974fe273f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89d56650a9bc9238d92bebe8c1ef6d65"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a89d56650a9bc9238d92bebe8c1ef6d65">Cancel</a> ()</td></tr>
<tr class="separator:a89d56650a9bc9238d92bebe8c1ef6d65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1dba9cde4a03d0d395bcb59345db7248"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a1dba9cde4a03d0d395bcb59345db7248">DebugString</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client=NULL)</td></tr>
<tr class="memdesc:a1dba9cde4a03d0d395bcb59345db7248"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dumps block mgr state. Grabs lock. If client is not NULL, also dumps its state. <a href="#a1dba9cde4a03d0d395bcb59345db7248">More...</a><br/></td></tr>
<tr class="separator:a1dba9cde4a03d0d395bcb59345db7248"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52695550d255f216048e336d91d526bc"><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.html#a52695550d255f216048e336d91d526bc">ConsumeMemory</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client, int64_t size)</td></tr>
<tr class="separator:a52695550d255f216048e336d91d526bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a794a503c56450c23960e10144a3ee25f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a794a503c56450c23960e10144a3ee25f">ReleaseMemory</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client, int64_t size)</td></tr>
<tr class="separator:a794a503c56450c23960e10144a3ee25f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c23e2921578ef202e7430a0375bfca8"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a2c23e2921578ef202e7430a0375bfca8">available_buffers</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client) const </td></tr>
<tr class="separator:a2c23e2921578ef202e7430a0375bfca8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56f3200d738096167c3e6a50d077ced8"><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.html#a56f3200d738096167c3e6a50d077ced8">MemLimitTooLowError</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client)</td></tr>
<tr class="separator:a56f3200d738096167c3e6a50d077ced8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cd26d226927aebcabe057773793bcce"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a3cd26d226927aebcabe057773793bcce">available_allocated_buffers</a> () const </td></tr>
<tr class="separator:a3cd26d226927aebcabe057773793bcce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cb1e195174c2f3fded3cdae639af303"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a4cb1e195174c2f3fded3cdae639af303">num_free_buffers</a> () const </td></tr>
<tr class="separator:a4cb1e195174c2f3fded3cdae639af303"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a342aa2bcf74c09ab57718e5fd8681f96"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a342aa2bcf74c09ab57718e5fd8681f96">num_pinned_buffers</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client) const </td></tr>
<tr class="separator:a342aa2bcf74c09ab57718e5fd8681f96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a823f6e86cee0f174f0ad36c3d253b287"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a823f6e86cee0f174f0ad36c3d253b287">num_reserved_buffers_remaining</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client) const </td></tr>
<tr class="separator:a823f6e86cee0f174f0ad36c3d253b287"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d133271046a0b51c118ee115faca19a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a6d133271046a0b51c118ee115faca19a">get_tracker</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client) const </td></tr>
<tr class="separator:a6d133271046a0b51c118ee115faca19a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6e6d613d4ed039d310d789ead20e231"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#ac6e6d613d4ed039d310d789ead20e231">max_block_size</a> () const </td></tr>
<tr class="separator:ac6e6d613d4ed039d310d789ead20e231"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19190fc46c5f1038d816b7e09581c9f6"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a19190fc46c5f1038d816b7e09581c9f6">bytes_allocated</a> () const </td></tr>
<tr class="separator:a19190fc46c5f1038d816b7e09581c9f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4157a6d2c9c4541b172ff653ce55d7b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1RuntimeProfile.html">RuntimeProfile</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#af4157a6d2c9c4541b172ff653ce55d7b">profile</a> ()</td></tr>
<tr class="separator:af4157a6d2c9c4541b172ff653ce55d7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7d678eeb63832623e3028e379879af2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#ab7d678eeb63832623e3028e379879af2">writes_issued</a> () const </td></tr>
<tr class="separator:ab7d678eeb63832623e3028e379879af2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a76ef041b360fb6146c687b3e479546e1"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classimpala_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a76ef041b360fb6146c687b3e479546e1">Create</a> (<a class="el" href="classimpala_1_1RuntimeState.html">RuntimeState</a> *state, <a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> *parent, <a class="el" href="classimpala_1_1RuntimeProfile.html">RuntimeProfile</a> *<a class="el" href="classimpala_1_1BufferedBlockMgr.html#af4157a6d2c9c4541b172ff653ce55d7b">profile</a>, int64_t mem_limit, int64_t buffer_size, boost::shared_ptr&lt; <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> &gt; *block_mgr)</td></tr>
<tr class="separator:a76ef041b360fb6146c687b3e479546e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4477cc5ba95e9952329bb67c15585556"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a4477cc5ba95e9952329bb67c15585556">GetNumReservedBlocks</a> ()</td></tr>
<tr class="memdesc:a4477cc5ba95e9952329bb67c15585556"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of blocks a block manager will reserve for its I/O buffers. <a href="#a4477cc5ba95e9952329bb67c15585556">More...</a><br/></td></tr>
<tr class="separator:a4477cc5ba95e9952329bb67c15585556"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-types"></a>
Private Types</h2></td></tr>
<tr class="memitem:aed8676a9964f72975b1f5b54983d2b03"><td class="memItemLeft" align="right" valign="top">typedef boost::unordered_map<br class="typebreak"/>
&lt; TUniqueId, boost::weak_ptr<br class="typebreak"/>
&lt; <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#aed8676a9964f72975b1f5b54983d2b03">BlockMgrsMap</a></td></tr>
<tr class="separator:aed8676a9964f72975b1f5b54983d2b03"><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:a0f71a0b57195f21a0b24073df9cb8342"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a0f71a0b57195f21a0b24073df9cb8342">BufferedBlockMgr</a> (<a class="el" href="classimpala_1_1RuntimeState.html">RuntimeState</a> *state, int64_t block_size)</td></tr>
<tr class="separator:a0f71a0b57195f21a0b24073df9cb8342"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bbad02d3a6e0184cad5d8682ece8dae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a5bbad02d3a6e0184cad5d8682ece8dae">Init</a> (<a class="el" href="classimpala_1_1DiskIoMgr.html">DiskIoMgr</a> *io_mgr, <a class="el" href="classimpala_1_1RuntimeProfile.html">RuntimeProfile</a> *<a class="el" href="classimpala_1_1BufferedBlockMgr.html#af4157a6d2c9c4541b172ff653ce55d7b">profile</a>, <a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> *parent_tracker, int64_t mem_limit)</td></tr>
<tr class="memdesc:a5bbad02d3a6e0184cad5d8682ece8dae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the block mgr. Idempotent and thread-safe. <a href="#a5bbad02d3a6e0184cad5d8682ece8dae">More...</a><br/></td></tr>
<tr class="separator:a5bbad02d3a6e0184cad5d8682ece8dae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c5fc9a51a790dba1ed1ff38af9e9ce7"><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.html#a3c5fc9a51a790dba1ed1ff38af9e9ce7">InitTmpFiles</a> ()</td></tr>
<tr class="separator:a3c5fc9a51a790dba1ed1ff38af9e9ce7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a897cbbbcebeb8e8399d03053908030fe"><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.html#a897cbbbcebeb8e8399d03053908030fe">PinBlock</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block, <a class="el" href="classbool.html">bool</a> *pinned, <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *src, <a class="el" href="classbool.html">bool</a> unpin)</td></tr>
<tr class="separator:a897cbbbcebeb8e8399d03053908030fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af603b95283cb5edcfc9a781a387bdb43"><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.html#af603b95283cb5edcfc9a781a387bdb43">UnpinBlock</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block)</td></tr>
<tr class="separator:af603b95283cb5edcfc9a781a387bdb43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87fe1fd37d2ee3599b8bbb81dc80aa2b"><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.html#a87fe1fd37d2ee3599b8bbb81dc80aa2b">DeleteBlock</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block)</td></tr>
<tr class="separator:a87fe1fd37d2ee3599b8bbb81dc80aa2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a00178efa6dc1eab5e8e76f7745dac8"><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.html#a6a00178efa6dc1eab5e8e76f7745dac8">DeleteOrUnpinBlock</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block, <a class="el" href="classbool.html">bool</a> unpin)</td></tr>
<tr class="separator:a6a00178efa6dc1eab5e8e76f7745dac8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09e13d36c3908c8f988ba5564f63d70b"><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.html#a09e13d36c3908c8f988ba5564f63d70b">TransferBuffer</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *dst, <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *src, <a class="el" href="classbool.html">bool</a> unpin)</td></tr>
<tr class="separator:a09e13d36c3908c8f988ba5564f63d70b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cf3eda5223c4487cd54eb54aabace9f"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a3cf3eda5223c4487cd54eb54aabace9f">remaining_unreserved_buffers</a> () const </td></tr>
<tr class="separator:a3cf3eda5223c4487cd54eb54aabace9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afba6a87429b782e109a3f99ef25e2900"><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.html#afba6a87429b782e109a3f99ef25e2900">FindBufferForBlock</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block, <a class="el" href="classbool.html">bool</a> *in_mem)</td></tr>
<tr class="separator:afba6a87429b782e109a3f99ef25e2900"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99ac55721ceae0175edb3c44c50d8550"><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.html#a99ac55721ceae0175edb3c44c50d8550">FindBuffer</a> (boost::unique_lock&lt; boost::mutex &gt; &amp;lock, <a class="el" href="structimpala_1_1BufferedBlockMgr_1_1BufferDescriptor.html">BufferDescriptor</a> **buffer)</td></tr>
<tr class="separator:a99ac55721ceae0175edb3c44c50d8550"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e3f63dec76e5f906fd50a011263988f"><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.html#a9e3f63dec76e5f906fd50a011263988f">WriteUnpinnedBlocks</a> ()</td></tr>
<tr class="separator:a9e3f63dec76e5f906fd50a011263988f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a838b49f1c3c947a078d500baf6d93ae5"><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.html#a838b49f1c3c947a078d500baf6d93ae5">WriteUnpinnedBlock</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block)</td></tr>
<tr class="memdesc:a838b49f1c3c947a078d500baf6d93ae5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Issues the write for this block to the <a class="el" href="classimpala_1_1DiskIoMgr.html">DiskIoMgr</a>. <a href="#a838b49f1c3c947a078d500baf6d93ae5">More...</a><br/></td></tr>
<tr class="separator:a838b49f1c3c947a078d500baf6d93ae5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f58a54274252c7bb3c54e2317630933"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a4f58a54274252c7bb3c54e2317630933">WriteComplete</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block, const <a class="el" href="classimpala_1_1Status.html">Status</a> &amp;write_status)</td></tr>
<tr class="separator:a4f58a54274252c7bb3c54e2317630933"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57538dda5ea4f7a2a43a5a2fbaf63bca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a57538dda5ea4f7a2a43a5a2fbaf63bca">ReturnUnusedBlock</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block)</td></tr>
<tr class="separator:a57538dda5ea4f7a2a43a5a2fbaf63bca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cfc416ca77efffdbd943fabd773d706"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a0cfc416ca77efffdbd943fabd773d706">GetUnusedBlock</a> (<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *client)</td></tr>
<tr class="separator:a0cfc416ca77efffdbd943fabd773d706"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e3d9f82322d2dbec44a0d194ad579d7"><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.html#a6e3d9f82322d2dbec44a0d194ad579d7">Validate</a> () const </td></tr>
<tr class="memdesc:a6e3d9f82322d2dbec44a0d194ad579d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used to debug the state of the block manager. Lock must already be taken. <a href="#a6e3d9f82322d2dbec44a0d194ad579d7">More...</a><br/></td></tr>
<tr class="separator:a6e3d9f82322d2dbec44a0d194ad579d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5fe211cdbf31b5fb3bc8c428c8b780f"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#ac5fe211cdbf31b5fb3bc8c428c8b780f">DebugInternal</a> () const </td></tr>
<tr class="separator:ac5fe211cdbf31b5fb3bc8c428c8b780f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed64a83575d26aa3eccd67d4d49ca036"><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.html#aed64a83575d26aa3eccd67d4d49ca036">Encrypt</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block, uint8_t **outbuf)</td></tr>
<tr class="separator:aed64a83575d26aa3eccd67d4d49ca036"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a337788b14042ad95cbb60d266c7657b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a337788b14042ad95cbb60d266c7657b6">EncryptDone</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block)</td></tr>
<tr class="memdesc:a337788b14042ad95cbb60d266c7657b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deallocates temporary buffer alloced in <a class="el" href="classimpala_1_1BufferedBlockMgr.html#aed64a83575d26aa3eccd67d4d49ca036">Encrypt()</a>. <a href="#a337788b14042ad95cbb60d266c7657b6">More...</a><br/></td></tr>
<tr class="separator:a337788b14042ad95cbb60d266c7657b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41fc197d9b01618edc9893f400027e14"><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.html#a41fc197d9b01618edc9893f400027e14">Decrypt</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block)</td></tr>
<tr class="memdesc:a41fc197d9b01618edc9893f400027e14"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrypts the contents of buffer() in place. <a href="#a41fc197d9b01618edc9893f400027e14">More...</a><br/></td></tr>
<tr class="separator:a41fc197d9b01618edc9893f400027e14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7df535bed5b54f21c6b2d7478277f3f5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a7df535bed5b54f21c6b2d7478277f3f5">SetHash</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block)</td></tr>
<tr class="memdesc:a7df535bed5b54f21c6b2d7478277f3f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Takes a cryptographic hash of the data and sets hash_ with it. <a href="#a7df535bed5b54f21c6b2d7478277f3f5">More...</a><br/></td></tr>
<tr class="separator:a7df535bed5b54f21c6b2d7478277f3f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a784e8ae0194fbf99b7f16731ef317711"><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.html#a784e8ae0194fbf99b7f16731ef317711">VerifyHash</a> (<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *block)</td></tr>
<tr class="memdesc:a784e8ae0194fbf99b7f16731ef317711"><td class="mdescLeft">&#160;</td><td class="mdescRight">Verifies that the contents of buffer() match those that were set by <a class="el" href="classimpala_1_1BufferedBlockMgr.html#a7df535bed5b54f21c6b2d7478277f3f5" title="Takes a cryptographic hash of the data and sets hash_ with it. ">SetHash()</a> <a href="#a784e8ae0194fbf99b7f16731ef317711">More...</a><br/></td></tr>
<tr class="separator:a784e8ae0194fbf99b7f16731ef317711"><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:af689303917eaaf85ce4ad0a44d6e6c43"><td class="memItemLeft" align="right" valign="top">const int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#af689303917eaaf85ce4ad0a44d6e6c43">max_block_size_</a></td></tr>
<tr class="memdesc:af689303917eaaf85ce4ad0a44d6e6c43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the largest/default block in bytes. <a href="#af689303917eaaf85ce4ad0a44d6e6c43">More...</a><br/></td></tr>
<tr class="separator:af689303917eaaf85ce4ad0a44d6e6c43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bfcfda8f2e29c07a4f050a6c07fd808"><td class="memItemLeft" align="right" valign="top">const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a6bfcfda8f2e29c07a4f050a6c07fd808">block_write_threshold_</a></td></tr>
<tr class="separator:a6bfcfda8f2e29c07a4f050a6c07fd808"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fb791cacf01816b470330d014469f4e"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a5fb791cacf01816b470330d014469f4e">disable_spill_</a></td></tr>
<tr class="separator:a5fb791cacf01816b470330d014469f4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4da642021a8ff01b90040b228cba10bd"><td class="memItemLeft" align="right" valign="top">const TUniqueId&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a4da642021a8ff01b90040b228cba10bd">query_id_</a></td></tr>
<tr class="separator:a4da642021a8ff01b90040b228cba10bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4ef162071abe0ae88c47e58a64e260b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1ObjectPool.html">ObjectPool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#aa4ef162071abe0ae88c47e58a64e260b">obj_pool_</a></td></tr>
<tr class="separator:aa4ef162071abe0ae88c47e58a64e260b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac215127b6c5f5ea3f80500ced986d5ae"><td class="memItemLeft" align="right" valign="top">boost::scoped_ptr&lt; <a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#ac215127b6c5f5ea3f80500ced986d5ae">mem_tracker_</a></td></tr>
<tr class="memdesc:ac215127b6c5f5ea3f80500ced986d5ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Track buffers allocated by the block manager. <a href="#ac215127b6c5f5ea3f80500ced986d5ae">More...</a><br/></td></tr>
<tr class="separator:ac215127b6c5f5ea3f80500ced986d5ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e66c366444d815acc70271ee38bdd19"><td class="memItemLeft" align="right" valign="top">boost::mutex&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a9e66c366444d815acc70271ee38bdd19">lock_</a></td></tr>
<tr class="separator:a9e66c366444d815acc70271ee38bdd19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a67f888364fd4e95aca80801781f958"><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.html#a1a67f888364fd4e95aca80801781f958">initialized_</a></td></tr>
<tr class="memdesc:a1a67f888364fd4e95aca80801781f958"><td class="mdescLeft">&#160;</td><td class="mdescRight">If true, <a class="el" href="classimpala_1_1BufferedBlockMgr.html#a5bbad02d3a6e0184cad5d8682ece8dae" title="Initializes the block mgr. Idempotent and thread-safe. ">Init()</a> has been called. <a href="#a1a67f888364fd4e95aca80801781f958">More...</a><br/></td></tr>
<tr class="separator:a1a67f888364fd4e95aca80801781f958"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a871bf9c1ca694f278d16af94bd6dd9a7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a871bf9c1ca694f278d16af94bd6dd9a7">unfullfilled_reserved_buffers_</a></td></tr>
<tr class="memdesc:a871bf9c1ca694f278d16af94bd6dd9a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">The total number of reserved buffers across all clients that are not pinned. <a href="#a871bf9c1ca694f278d16af94bd6dd9a7">More...</a><br/></td></tr>
<tr class="separator:a871bf9c1ca694f278d16af94bd6dd9a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4f1123a87993beb9355cacd8ad4368f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#ad4f1123a87993beb9355cacd8ad4368f">total_pinned_buffers_</a></td></tr>
<tr class="memdesc:ad4f1123a87993beb9355cacd8ad4368f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The total number of pinned buffers across all clients. <a href="#ad4f1123a87993beb9355cacd8ad4368f">More...</a><br/></td></tr>
<tr class="separator:ad4f1123a87993beb9355cacd8ad4368f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55327b51166c1dced4425ecdf1b93658"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a55327b51166c1dced4425ecdf1b93658">non_local_outstanding_writes_</a></td></tr>
<tr class="separator:a55327b51166c1dced4425ecdf1b93658"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad13df5bfb8825411a1c2579879a35eab"><td class="memItemLeft" align="right" valign="top">boost::condition_variable&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#ad13df5bfb8825411a1c2579879a35eab">buffer_available_cv_</a></td></tr>
<tr class="memdesc:ad13df5bfb8825411a1c2579879a35eab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal availability of free buffers. <a href="#ad13df5bfb8825411a1c2579879a35eab">More...</a><br/></td></tr>
<tr class="separator:ad13df5bfb8825411a1c2579879a35eab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acee7e11e770fcceb10f9774a19aa0da3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1InternalQueue.html">InternalQueue</a>&lt; <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#acee7e11e770fcceb10f9774a19aa0da3">unpinned_blocks_</a></td></tr>
<tr class="separator:acee7e11e770fcceb10f9774a19aa0da3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a943168d8980260c3dd562a36a3b483b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1InternalQueue.html">InternalQueue</a>&lt; <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a943168d8980260c3dd562a36a3b483b1">unused_blocks_</a></td></tr>
<tr class="separator:a943168d8980260c3dd562a36a3b483b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad77e0ded5dd0baa97ec5aca3be0c4857"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1InternalQueue.html">InternalQueue</a>&lt; <a class="el" href="structimpala_1_1BufferedBlockMgr_1_1BufferDescriptor.html">BufferDescriptor</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#ad77e0ded5dd0baa97ec5aca3be0c4857">free_io_buffers_</a></td></tr>
<tr class="separator:ad77e0ded5dd0baa97ec5aca3be0c4857"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf728961e82fb837311be3143ac369e0"><td class="memItemLeft" align="right" valign="top">std::list&lt; <a class="el" href="structimpala_1_1BufferedBlockMgr_1_1BufferDescriptor.html">BufferDescriptor</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#acf728961e82fb837311be3143ac369e0">all_io_buffers_</a></td></tr>
<tr class="memdesc:acf728961e82fb837311be3143ac369e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">All allocated io-sized buffers. <a href="#acf728961e82fb837311be3143ac369e0">More...</a><br/></td></tr>
<tr class="separator:acf728961e82fb837311be3143ac369e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3ca8baeb5e41ff28afbabc22d6d7e29"><td class="memItemLeft" align="right" valign="top">boost::ptr_vector<br class="typebreak"/>
&lt; <a class="el" href="classimpala_1_1TmpFileMgr_1_1File.html">TmpFileMgr::File</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#ae3ca8baeb5e41ff28afbabc22d6d7e29">tmp_files_</a></td></tr>
<tr class="separator:ae3ca8baeb5e41ff28afbabc22d6d7e29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b942031de4227fa6abc6d6b253dbc5b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a4b942031de4227fa6abc6d6b253dbc5b">next_block_index_</a></td></tr>
<tr class="separator:a4b942031de4227fa6abc6d6b253dbc5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3727560d3056edc8f0d6f67c30b18a8a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1DiskIoMgr.html">DiskIoMgr</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a3727560d3056edc8f0d6f67c30b18a8a">io_mgr_</a></td></tr>
<tr class="memdesc:a3727560d3056edc8f0d6f67c30b18a8a"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classimpala_1_1DiskIoMgr.html">DiskIoMgr</a> handles to read and write blocks. <a href="#a3727560d3056edc8f0d6f67c30b18a8a">More...</a><br/></td></tr>
<tr class="separator:a3727560d3056edc8f0d6f67c30b18a8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fa292d642eacb664388d07792294f9b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1DiskIoMgr_1_1RequestContext.html">DiskIoMgr::RequestContext</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a3fa292d642eacb664388d07792294f9b">io_request_context_</a></td></tr>
<tr class="separator:a3fa292d642eacb664388d07792294f9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaa53b664c5ec1265c89b25afd70aa04"><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.html#aaaa53b664c5ec1265c89b25afd70aa04">is_cancelled_</a></td></tr>
<tr class="separator:aaaa53b664c5ec1265c89b25afd70aa04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a555fb8f4857bdab650895b4468332c53"><td class="memItemLeft" align="right" valign="top">boost::scoped_ptr&lt; <a class="el" href="classimpala_1_1RuntimeProfile.html">RuntimeProfile</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a555fb8f4857bdab650895b4468332c53">profile_</a></td></tr>
<tr class="memdesc:a555fb8f4857bdab650895b4468332c53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Counters and timers to track behavior. <a href="#a555fb8f4857bdab650895b4468332c53">More...</a><br/></td></tr>
<tr class="separator:a555fb8f4857bdab650895b4468332c53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c9ada787430720de06f3eafc47af53e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a7c9ada787430720de06f3eafc47af53e">mem_limit_counter_</a></td></tr>
<tr class="memdesc:a7c9ada787430720de06f3eafc47af53e"><td class="mdescLeft">&#160;</td><td class="mdescRight">These have a fixed value for the lifetime of the manager and show memory usage. <a href="#a7c9ada787430720de06f3eafc47af53e">More...</a><br/></td></tr>
<tr class="separator:a7c9ada787430720de06f3eafc47af53e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb4438f9c5fca33d44facd350ada51ff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#acb4438f9c5fca33d44facd350ada51ff">block_size_counter_</a></td></tr>
<tr class="separator:acb4438f9c5fca33d44facd350ada51ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad679d4aee028b2611a6c0cadb63d6ba5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#ad679d4aee028b2611a6c0cadb63d6ba5">created_block_counter_</a></td></tr>
<tr class="memdesc:ad679d4aee028b2611a6c0cadb63d6ba5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Total number of blocks created. <a href="#ad679d4aee028b2611a6c0cadb63d6ba5">More...</a><br/></td></tr>
<tr class="separator:ad679d4aee028b2611a6c0cadb63d6ba5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a267ba7ea2b63d43fc37d5db79ceda533"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a267ba7ea2b63d43fc37d5db79ceda533">recycled_blocks_counter_</a></td></tr>
<tr class="memdesc:a267ba7ea2b63d43fc37d5db79ceda533"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of deleted blocks reused. <a href="#a267ba7ea2b63d43fc37d5db79ceda533">More...</a><br/></td></tr>
<tr class="separator:a267ba7ea2b63d43fc37d5db79ceda533"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cc209237769542b3b75810332f7e3fd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a4cc209237769542b3b75810332f7e3fd">buffered_pin_counter_</a></td></tr>
<tr class="memdesc:a4cc209237769542b3b75810332f7e3fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of Pin() calls that did not require a disk read. <a href="#a4cc209237769542b3b75810332f7e3fd">More...</a><br/></td></tr>
<tr class="separator:a4cc209237769542b3b75810332f7e3fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad30d1250c262dd05e6090b37d4af35f2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#ad30d1250c262dd05e6090b37d4af35f2">disk_read_timer_</a></td></tr>
<tr class="memdesc:ad30d1250c262dd05e6090b37d4af35f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Time taken for disk reads. <a href="#ad30d1250c262dd05e6090b37d4af35f2">More...</a><br/></td></tr>
<tr class="separator:ad30d1250c262dd05e6090b37d4af35f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b9871b3b2a381b5ecbbb37d7144b612"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a3b9871b3b2a381b5ecbbb37d7144b612">buffer_wait_timer_</a></td></tr>
<tr class="memdesc:a3b9871b3b2a381b5ecbbb37d7144b612"><td class="mdescLeft">&#160;</td><td class="mdescRight">Time spent waiting for a free buffer. <a href="#a3b9871b3b2a381b5ecbbb37d7144b612">More...</a><br/></td></tr>
<tr class="separator:a3b9871b3b2a381b5ecbbb37d7144b612"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2ad74e4f63345951f3d9538d8e35307"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#af2ad74e4f63345951f3d9538d8e35307">bytes_written_counter_</a></td></tr>
<tr class="memdesc:af2ad74e4f63345951f3d9538d8e35307"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of bytes written to disk (includes writes still queued in the IO manager). <a href="#af2ad74e4f63345951f3d9538d8e35307">More...</a><br/></td></tr>
<tr class="separator:af2ad74e4f63345951f3d9538d8e35307"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb7806c5773497699e3d880a3770a140"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#aeb7806c5773497699e3d880a3770a140">outstanding_writes_counter_</a></td></tr>
<tr class="memdesc:aeb7806c5773497699e3d880a3770a140"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of writes outstanding (issued but not completed). <a href="#aeb7806c5773497699e3d880a3770a140">More...</a><br/></td></tr>
<tr class="separator:aeb7806c5773497699e3d880a3770a140"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c5d8f0b89fabd62f3fc640f94643948"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a7c5d8f0b89fabd62f3fc640f94643948">encryption_timer_</a></td></tr>
<tr class="memdesc:a7c5d8f0b89fabd62f3fc640f94643948"><td class="mdescLeft">&#160;</td><td class="mdescRight">Time spent in disk spill encryption and decryption. <a href="#a7c5d8f0b89fabd62f3fc640f94643948">More...</a><br/></td></tr>
<tr class="separator:a7c5d8f0b89fabd62f3fc640f94643948"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab67107d799775549a42f5be44c8b04d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#ab67107d799775549a42f5be44c8b04d4">integrity_check_timer_</a></td></tr>
<tr class="memdesc:ab67107d799775549a42f5be44c8b04d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Time spent in disk spill integrity generation and checking. <a href="#ab67107d799775549a42f5be44c8b04d4">More...</a><br/></td></tr>
<tr class="separator:ab67107d799775549a42f5be44c8b04d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f5db3ecfabd31a7111d13385e971979"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a7f5db3ecfabd31a7111d13385e971979">writes_issued_</a></td></tr>
<tr class="memdesc:a7f5db3ecfabd31a7111d13385e971979"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of writes issued. <a href="#a7f5db3ecfabd31a7111d13385e971979">More...</a><br/></td></tr>
<tr class="separator:a7f5db3ecfabd31a7111d13385e971979"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff37530220851e59a6483912ab2c475f"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#aff37530220851e59a6483912ab2c475f">encryption_</a></td></tr>
<tr class="separator:aff37530220851e59a6483912ab2c475f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f7694664dd89a64c9e036bdcdc078e2"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a7f7694664dd89a64c9e036bdcdc078e2">check_integrity_</a></td></tr>
<tr class="separator:a7f7694664dd89a64c9e036bdcdc078e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-attribs"></a>
Static Private Attributes</h2></td></tr>
<tr class="memitem:a0dc5bc091c0ec45b24ae37e2da2bab5d"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classimpala_1_1SpinLock.html">SpinLock</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a0dc5bc091c0ec45b24ae37e2da2bab5d">static_block_mgrs_lock_</a></td></tr>
<tr class="memdesc:a0dc5bc091c0ec45b24ae37e2da2bab5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Protects query_to_block_mgrs_. <a href="#a0dc5bc091c0ec45b24ae37e2da2bab5d">More...</a><br/></td></tr>
<tr class="separator:a0dc5bc091c0ec45b24ae37e2da2bab5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c0051cb9c4a7f374477f2e0bdfe50f5"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classimpala_1_1BufferedBlockMgr.html#aed8676a9964f72975b1f5b54983d2b03">BlockMgrsMap</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a2c0051cb9c4a7f374477f2e0bdfe50f5">query_to_block_mgrs_</a></td></tr>
<tr class="separator:a2c0051cb9c4a7f374477f2e0bdfe50f5"><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:a9bee35b146080ab7239cc8aff02333c3"><td class="memItemLeft" align="right" valign="top">struct&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a9bee35b146080ab7239cc8aff02333c3">Client</a></td></tr>
<tr class="separator:a9bee35b146080ab7239cc8aff02333c3"><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>The <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> is used to allocate and manage blocks of data using a fixed memory budget. Available memory is split into a pool of fixed-size memory buffers. When a client allocates or requests a block, the block is assigned a buffer from this pool and is 'pinned' in memory. Clients can also unpin a block, allowing the manager to reassign its buffer to a different block. The <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> typically allocates blocks in IO buffer size to get maximal IO efficiency when spilling. Clients can also request smaller buffers that cannot spill (note that it would be possible to spill small buffers, but we currently do not allow it). This is useful to present the same block API and mem tracking for clients (one can use the block mgr API to mem track non-spillable (smaller) buffers). Clients that do partitioning (e.g. PHJ and PAGG) will start with these smaller buffer sizes to reduce the minimum buffering requirements and grow to max sized buffers as the input grows. For simplicity, these small buffers are not recycled (there's also not really a need since they are allocated all at once on query startup). These buffers are not counted against the reservation. The <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> reserves one buffer per disk ('block_write_threshold_') for itself. When the number of free buffers falls below 'block_write_threshold', unpinned blocks are flushed in Last-In-First-Out order. (It is assumed that unpinned blocks are re-read in FIFO order). The <a class="el" href="classimpala_1_1TmpFileMgr.html">TmpFileMgr</a> is used to obtain file handles to write to within the tmp directories configured for Impala. It is expected to have one <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> per query. All allocations that can grow proportional to the input size and that might need to spill to disk should allocate from the same <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a>. A client must pin a block in memory to read/write its contents and unpin it when it is no longer in active use. The <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> guarantees that: a) The memory buffer assigned to a block is not removed or released while it is pinned. b) The contents of an unpinned block will be available on a subsequent call to pin. The <a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> supports the following operations: <a class="el" href="classimpala_1_1BufferedBlockMgr.html#ac4ddea92960294d8f764c2974fe273f9">GetNewBlock()</a>: Returns a new pinned block. Close(): Frees all memory and disk space. Called when a query is closed or cancelled. Close() is idempotent. A <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> supports the following operations: Pin(): Pins a block to a buffer in memory, and reads its contents from disk if necessary. If there are no free buffers, waits for a buffer to become available. Invoked before the contents of a block are read or written. The block will be maintained in memory until Unpin() is called. Unpin(): Invoked to indicate the block is not in active use. The block is added to a list of unpinned blocks. Unpinned blocks are only written when the number of free blocks falls below the 'block_write_threshold'. Delete(): Invoked to deallocate a block. The buffer associated with the block is immediately released and its on-disk location (if any) reused. The block manager is thread-safe with the following caveat: A single block cannot be used simultaneously by multiple clients in any capacity. However, the block manager client is not thread-safe. That is, the block manager allows multiple single-threaded block manager clients. TODO: When a block is read from disk, data is copied from the IOMgr buffer to the block manager's buffer. This should be avoided in the common case where these buffers are of the same size. TODO: See if the one big lock is a bottleneck. Break it up. This object is shared by all operators within a query (across fragments), see IMPALA-1883. TODO: No reason we can't spill the smaller buffers. Add it if we need to (it's likely just removing dchecks). TODO: The requirements on this object has grown organically. Consider a major reworking. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00092">92</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="aed8676a9964f72975b1f5b54983d2b03"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">typedef boost::unordered_map&lt;TUniqueId, boost::weak_ptr&lt;<a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a>&gt; &gt; <a class="el" href="classimpala_1_1BufferedBlockMgr.html#aed8676a9964f72975b1f5b54983d2b03">impala::BufferedBlockMgr::BlockMgrsMap</a></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>All per-query <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> objects that are in use. For memory management, this map contains only weak ptrs. BufferedBlockMgrs that are handed out are shared ptrs. When all the shared ptrs are no longer referenced, the <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> d'tor will be called at which point the weak ptr will be removed from the map. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00620">620</a> of file <a class="el" href="buffered-block-mgr_8h_source.html">buffered-block-mgr.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a65cb8755b19bbfb34a1e0f6d1a4fc8e0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">impala::BufferedBlockMgr::~BufferedBlockMgr </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00481">481</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_8h_source.html#l00556">all_io_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00397">impala::BufferedBlockMgr::BufferDescriptor::buffer</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00567">io_mgr_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00568">io_request_context_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00400">impala::BufferedBlockMgr::BufferDescriptor::len</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00511">mem_tracker_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00531">non_local_outstanding_writes_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00506">query_id_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00621">query_to_block_mgrs_</a>, <a class="el" href="tmp-file-mgr_8cc_source.html#l00132">impala::TmpFileMgr::File::Remove()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00613">static_block_mgrs_lock_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00560">tmp_files_</a>, and <a class="el" href="disk-io-mgr_8cc_source.html#l00344">impala::DiskIoMgr::UnregisterContext()</a>.</p>
</div>
</div>
<a class="anchor" id="a0f71a0b57195f21a0b24073df9cb8342"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">impala::BufferedBlockMgr::BufferedBlockMgr </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1RuntimeState.html">RuntimeState</a> *&#160;</td>
<td class="paramname"><em>state</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>block_size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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#l00182">182</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#l00199">Create()</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a3cd26d226927aebcabe057773793bcce"></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::available_allocated_buffers </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>TODO: Remove these two. Not clear what the sorter really needs. TODO: Those are dirty, dangerous reads to two lists whose all other accesses are protected by the lock_. Using those two functions is looking for trouble. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00380">380</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#l00556">all_io_buffers_</a>.</p>
<p>Referenced by <a class="el" href="sorter_8cc_source.html#l00949">impala::Sorter::InputDone()</a>, and <a class="el" href="sorter_8cc_source.html#l01054">impala::Sorter::MergeIntermediateRuns()</a>.</p>
</div>
</div>
<a class="anchor" id="a2c23e2921578ef202e7430a0375bfca8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int64_t impala::BufferedBlockMgr::available_buffers </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>The number of buffers available for client. That is, if all other clients were stopped, the number of buffers this client could get. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00221">221</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#l00083">impala::BufferedBlockMgr::Client::num_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00077">impala::BufferedBlockMgr::Client::num_reserved_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00080">impala::BufferedBlockMgr::Client::num_tmp_reserved_buffers_</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00227">remaining_unreserved_buffers()</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00257">TryAcquireTmpReservation()</a>.</p>
</div>
</div>
<a class="anchor" id="a19190fc46c5f1038d816b7e09581c9f6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int64_t impala::BufferedBlockMgr::bytes_allocated </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00510">510</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_8h_source.html#l00511">mem_tracker_</a>.</p>
</div>
</div>
<a class="anchor" id="a89d56650a9bc9238d92bebe8c1ef6d65"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void impala::BufferedBlockMgr::Cancel </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Cancels the block mgr. All subsequent calls fail with <a class="el" href="classimpala_1_1Status.html#a318b69bf42d4d23f7ae71a8006efb85b">Status::CANCELLED</a>. Idempotent. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00359">359</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="disk-io-mgr_8cc_source.html#l00377">impala::DiskIoMgr::CancelContext()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00567">io_mgr_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00568">io_request_context_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00573">is_cancelled_</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00144">impala::BufferedBlockMgrTest::TestRandomInternalImpl()</a>.</p>
</div>
</div>
<a class="anchor" id="a25a5078b6ff96b4bc78dd59ebe447919"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void impala::BufferedBlockMgr::ClearReservations </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Clears all reservations for this client. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00244">244</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_8h_source.html#l00518">lock_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00083">impala::BufferedBlockMgr::Client::num_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00077">impala::BufferedBlockMgr::Client::num_reserved_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00080">impala::BufferedBlockMgr::Client::num_tmp_reserved_buffers_</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00524">unfullfilled_reserved_buffers_</a>.</p>
<p>Referenced by <a class="el" href="partitioned-hash-join-node_8cc_source.html#l00192">impala::PartitionedHashJoinNode::Close()</a>, <a class="el" href="partitioned-aggregation-node_8cc_source.html#l00380">impala::PartitionedAggregationNode::Close()</a>, and <a class="el" href="sorter_8cc_source.html#l00884">impala::Sorter::~Sorter()</a>.</p>
</div>
</div>
<a class="anchor" id="ae78494b85f739b709f17404b31cce793"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void impala::BufferedBlockMgr::ClearTmpReservation </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets tmp reservation to 0 on this client. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00272">272</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_8h_source.html#l00518">lock_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00080">impala::BufferedBlockMgr::Client::num_tmp_reserved_buffers_</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00524">unfullfilled_reserved_buffers_</a>.</p>
</div>
</div>
<a class="anchor" id="a52695550d255f216048e336d91d526bc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classbool.html">bool</a> impala::BufferedBlockMgr::ConsumeMemory </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Consumes 'size' bytes from the buffered block mgr. This is used by callers that want the memory to come from the block mgr pool (and therefore trigger spilling) but need the allocation to be more flexible than blocks. Returns false if there was not enough memory. TODO: this is added specifically to support the Buckets structure in the hash table which does not map well to Blocks. Revisit this. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00278">278</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_8h_source.html#l00406">impala::BufferedBlockMgr::BufferDescriptor::all_buffers_it</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00556">all_io_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00403">impala::BufferedBlockMgr::BufferDescriptor::block</a>, <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">impala::BufferedBlockMgr::Block::buffer_desc_</a>, <a class="el" href="bit-util_8h_source.html#l00032">impala::BitUtil::Ceil()</a>, <a class="el" href="mem-tracker_8h_source.html#l00145">impala::MemTracker::ConsumeLocal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>, <a class="el" href="runtime-state_8cc_source.html#l00224">impala::RuntimeState::LogError()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00386">max_block_size()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00511">mem_tracker_</a>, <a class="el" href="status_8h_source.html#l00189">impala::Status::msg()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00080">impala::BufferedBlockMgr::Client::num_tmp_reserved_buffers_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="status_8h_source.html#l00172">impala::Status::ok()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00506">query_id_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00074">impala::BufferedBlockMgr::Client::query_tracker_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00227">remaining_unreserved_buffers()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00061">impala::BufferedBlockMgr::Client::state_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00070">impala::BufferedBlockMgr::Client::tracker_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00524">unfullfilled_reserved_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, <a class="el" href="logging_8h_source.html#l00057">VLOG_QUERY</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>.</p>
<p>Referenced by <a class="el" href="hash-table_8cc_source.html#l00245">impala::HashTable::Init()</a>, and <a class="el" href="hash-table_8cc_source.html#l00293">impala::HashTable::ResizeBuckets()</a>.</p>
</div>
</div>
<a class="anchor" id="a76ef041b360fb6146c687b3e479546e1"></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_1Status.html">Status</a> impala::BufferedBlockMgr::Create </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1RuntimeState.html">RuntimeState</a> *&#160;</td>
<td class="paramname"><em>state</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> *&#160;</td>
<td class="paramname"><em>parent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classimpala_1_1RuntimeProfile.html">RuntimeProfile</a> *&#160;</td>
<td class="paramname"><em>profile</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>mem_limit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>buffer_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">boost::shared_ptr&lt; <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> &gt; *&#160;</td>
<td class="paramname"><em>block_mgr</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a block manager with the specified mem_limit. If a block mgr with the same query id has already been created, that block mgr is returned.</p>
<ul>
<li>mem_limit: maximum memory that will be used by the block mgr.</li>
<li>buffer_size: maximum size of each buffer. </li>
</ul>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00199">199</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#l00182">BufferedBlockMgr()</a>, <a class="el" href="runtime-state_8h_source.html#l00139">impala::RuntimeState::io_mgr()</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00388">profile()</a>, <a class="el" href="runtime-state_8h_source.html#l00125">impala::RuntimeState::query_id()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00621">query_to_block_mgrs_</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00613">static_block_mgrs_lock_</a>.</p>
<p>Referenced by <a class="el" href="runtime-state_8cc_source.html#l00166">impala::RuntimeState::CreateBlockMgr()</a>, <a class="el" href="buffered-tuple-stream-test_8cc_source.html#l00093">impala::SimpleTupleStreamTest::CreateMgr()</a>, and <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00114">impala::BufferedBlockMgrTest::CreateMgr()</a>.</p>
</div>
</div>
<a class="anchor" id="ac5fe211cdbf31b5fb3bc8c428c8b780f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">string impala::BufferedBlockMgr::DebugInternal </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>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">1090</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_8h_source.html#l00500">block_write_threshold_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00553">free_io_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00496">max_block_size_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00511">mem_tracker_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00601">outstanding_writes_counter_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00227">remaining_unreserved_buffers()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00527">total_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00524">unfullfilled_reserved_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00540">unpinned_blocks_</a>, and <a class="el" href="runtime-profile_8h_source.html#l00108">impala::RuntimeProfile::Counter::value()</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00278">ConsumeMemory()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01082">DebugString()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00369">MemLimitTooLowError()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">UnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00481">~BufferedBlockMgr()</a>.</p>
</div>
</div>
<a class="anchor" id="a1dba9cde4a03d0d395bcb59345db7248"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string impala::BufferedBlockMgr::DebugString </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</em> = <code>NULL</code></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Dumps block mgr state. Grabs lock. If client is not NULL, also dumps its state. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l01082">1082</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#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00102">impala::BufferedBlockMgr::Client::DebugString()</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>.</p>
<p>Referenced by <a class="el" href="buffered-tuple-stream_8cc_source.html#l00248">impala::BufferedTupleStream::NextBlockForRead()</a>, <a class="el" href="buffered-tuple-stream_8cc_source.html#l00357">impala::BufferedTupleStream::PinStream()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00144">impala::BufferedBlockMgr::Block::Validate()</a>.</p>
</div>
</div>
<a class="anchor" id="a41fc197d9b01618edc9893f400027e14"></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_1Status.html">Status</a> impala::BufferedBlockMgr::Decrypt </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</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>Decrypts the contents of buffer() in place. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l01239">1239</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_8h_source.html#l00181">impala::BufferedBlockMgr::Block::buffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00641">encryption_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00604">encryption_timer_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00259">impala::BufferedBlockMgr::Block::iv_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00250">impala::BufferedBlockMgr::Block::key_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01176">impala::OpenSSLErr()</a>, <a class="el" href="runtime-profile_8h_source.html#l00053">SCOPED_TIMER</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00239">impala::BufferedBlockMgr::Block::valid_data_len_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a87fe1fd37d2ee3599b8bbb81dc80aa2b"></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_1Status.html">Status</a> impala::BufferedBlockMgr::DeleteBlock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</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#l00783">783</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_8h_source.html#l00403">impala::BufferedBlockMgr::BufferDescriptor::block</a>, <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#l00534">buffer_available_cv_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00222">impala::BufferedBlockMgr::Block::buffer_desc_</a>, <a class="el" href="status_8h_source.html#l00088">impala::Status::CANCELLED</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00228">impala::BufferedBlockMgr::Block::client_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00168">impala::BufferedBlockMgr::Block::DebugString()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00553">free_io_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00274">impala::BufferedBlockMgr::Block::in_write_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00573">is_cancelled_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00277">impala::BufferedBlockMgr::Block::is_deleted_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00198">impala::BufferedBlockMgr::Block::is_max_size()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00270">impala::BufferedBlockMgr::Block::is_pinned_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00400">impala::BufferedBlockMgr::BufferDescriptor::len</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00496">max_block_size_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00083">impala::BufferedBlockMgr::Client::num_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00077">impala::BufferedBlockMgr::Client::num_reserved_buffers_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="mem-tracker_8h_source.html#l00209">impala::MemTracker::Release()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00828">ReturnUnusedBlock()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00527">total_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00070">impala::BufferedBlockMgr::Client::tracker_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00524">unfullfilled_reserved_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00093">impala::BufferedBlockMgr::Client::UnpinBuffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00540">unpinned_blocks_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00144">impala::BufferedBlockMgr::Block::Validate()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>.</p>
</div>
</div>
<a class="anchor" id="a6a00178efa6dc1eab5e8e76f7745dac8"></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_1Status.html">Status</a> impala::BufferedBlockMgr::DeleteOrUnpinBlock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</em>, </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>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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>If the 'block' is NULL, checks if cancelled and returns. Otherwise, depending on 'unpin' calls either <a class="el" href="classimpala_1_1BufferedBlockMgr.html#a87fe1fd37d2ee3599b8bbb81dc80aa2b">DeleteBlock()</a> or <a class="el" href="classimpala_1_1BufferedBlockMgr.html#af603b95283cb5edcfc9a781a387bdb43">UnpinBlock()</a>, which both first check for cancellation. It should be called without the lock_ acquired. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00528">528</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="status_8h_source.html#l00088">impala::Status::CANCELLED</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00130">impala::BufferedBlockMgr::Block::Delete()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00573">is_cancelled_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00126">impala::BufferedBlockMgr::Block::Unpin()</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="aed64a83575d26aa3eccd67d4d49ca036"></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_1Status.html">Status</a> impala::BufferedBlockMgr::Encrypt </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t **&#160;</td>
<td class="paramname"><em>outbuf</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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>Takes the data in buffer(), allocates encrypted_write_buffer_, and returns a pointer to the encrypted data in outbuf. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l01183">1183</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_8h_source.html#l00181">impala::BufferedBlockMgr::Block::buffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00247">impala::BufferedBlockMgr::Block::encrypted_write_buffer_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00641">encryption_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00604">encryption_timer_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00274">impala::BufferedBlockMgr::Block::in_write_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00270">impala::BufferedBlockMgr::Block::is_pinned_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00259">impala::BufferedBlockMgr::Block::iv_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00250">impala::BufferedBlockMgr::Block::key_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01176">impala::OpenSSLErr()</a>, <a class="el" href="runtime-profile_8h_source.html#l00053">SCOPED_TIMER</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00239">impala::BufferedBlockMgr::Block::valid_data_len_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a337788b14042ad95cbb60d266c7657b6"></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::EncryptDone </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</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>Deallocates temporary buffer alloced in <a class="el" href="classimpala_1_1BufferedBlockMgr.html#aed64a83575d26aa3eccd67d4d49ca036">Encrypt()</a>. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l01233">1233</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_8h_source.html#l00247">impala::BufferedBlockMgr::Block::encrypted_write_buffer_</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00641">encryption_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>.</p>
</div>
</div>
<a class="anchor" id="a99ac55721ceae0175edb3c44c50d8550"></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_1Status.html">Status</a> impala::BufferedBlockMgr::FindBuffer </td>
<td>(</td>
<td class="paramtype">boost::unique_lock&lt; boost::mutex &gt; &amp;&#160;</td>
<td class="paramname"><em>lock</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1BufferDescriptor.html">BufferDescriptor</a> **&#160;</td>
<td class="paramname"><em>buffer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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>Returns a new buffer that can be used. *buffer is set to NULL if there was no memory. Otherwise, this function gets a new buffer by:</p>
<ol type="1">
<li>Allocating a new buffer if possible</li>
<li>Using a buffer from the free list (which is populated by moving blocks from the unpinned list by writing them out). Must be called with the lock_ already taken. This function can block. </li>
</ol>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">936</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="object-pool_8h_source.html#l00042">impala::ObjectPool::Add()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00556">all_io_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00500">block_write_threshold_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00534">buffer_available_cv_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00595">buffer_wait_timer_</a>, <a class="el" href="status_8h_source.html#l00088">impala::Status::CANCELLED</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00504">disable_spill_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00553">free_io_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00573">is_cancelled_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00496">max_block_size_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00511">mem_tracker_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00531">non_local_outstanding_writes_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00508">obj_pool_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="status_8h_source.html#l00242">RETURN_IF_ERROR</a>, <a class="el" href="runtime-profile_8h_source.html#l00053">SCOPED_TIMER</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00540">unpinned_blocks_</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00278">ConsumeMemory()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="afba6a87429b782e109a3f99ef25e2900"></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_1Status.html">Status</a> impala::BufferedBlockMgr::FindBufferForBlock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</em>, </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>in_mem</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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>Finds a buffer for a block and pins it. If the block's buffer has not been evicted, it removes the block from the unpinned list and sets *in_mem = true. If the block is not in memory, it will call <a class="el" href="classimpala_1_1BufferedBlockMgr.html#a99ac55721ceae0175edb3c44c50d8550">FindBuffer()</a> that may block. If we can't get a buffer (e.g. no more memory, nothing in the unpinned and free lists) this function returns with the block unpinned. Uses the lock_, the caller should not have already acquired the lock_. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">836</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="runtime-profile_8h_source.html#l00093">impala::RuntimeProfile::Counter::Add()</a>, <a class="el" href="status_8cc_source.html#l00166">impala::Status::AddDetail()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00403">impala::BufferedBlockMgr::BufferDescriptor::block</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00222">impala::BufferedBlockMgr::Block::buffer_desc_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00589">buffered_pin_counter_</a>, <a class="el" href="status_8h_source.html#l00088">impala::Status::CANCELLED</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00228">impala::BufferedBlockMgr::Block::client_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00102">impala::BufferedBlockMgr::Client::DebugString()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00168">impala::BufferedBlockMgr::Block::DebugString()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00553">free_io_buffers_</a>, <a class="el" href="debug-util_8cc_source.html#l00246">impala::GetStackTrace()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00274">impala::BufferedBlockMgr::Block::in_write_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00573">is_cancelled_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00277">impala::BufferedBlockMgr::Block::is_deleted_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00270">impala::BufferedBlockMgr::Block::is_pinned_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>, <a class="el" href="status_8h_source.html#l00089">impala::Status::MEM_LIMIT_EXCEEDED</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00083">impala::BufferedBlockMgr::Client::num_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00077">impala::BufferedBlockMgr::Client::num_reserved_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00080">impala::BufferedBlockMgr::Client::num_tmp_reserved_buffers_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00085">impala::BufferedBlockMgr::Client::PinBuffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00506">query_id_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00227">remaining_unreserved_buffers()</a>, <a class="el" href="status_8h_source.html#l00242">RETURN_IF_ERROR</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00527">total_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00524">unfullfilled_reserved_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00540">unpinned_blocks_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00144">impala::BufferedBlockMgr::Block::Validate()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, <a class="el" href="logging_8h_source.html#l00057">VLOG_QUERY</a>, <a class="el" href="logging_8h_source.html#l00064">VLOG_QUERY_IS_ON</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">GetNewBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a6d133271046a0b51c118ee115faca19a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> * impala::BufferedBlockMgr::get_tracker </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00522">522</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#l00070">impala::BufferedBlockMgr::Client::tracker_</a>.</p>
<p>Referenced by <a class="el" href="buffered-tuple-stream_8cc_source.html#l00431">impala::BufferedTupleStream::GetRows()</a>.</p>
</div>
</div>
<a class="anchor" id="ac4ddea92960294d8f764c2974fe273f9"></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::GetNewBlock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</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>unpin_block</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>block</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>len</em> = <code>-1</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return a new pinned block. If there is no memory for this block, *block will be set to NULL. If len &gt; 0, <a class="el" href="classimpala_1_1BufferedBlockMgr.html#ac4ddea92960294d8f764c2974fe273f9">GetNewBlock()</a> will return a block with a buffer of size len. len must be less than max_block_size and this block cannot be unpinned. This function will try to allocate new memory for the block up to the limit. Otherwise it will (conceptually) write out an unpinned block and use that memory. The caller can pass a non-NULL 'unpin_block' to transfer memory from 'unpin_block' to the new block. If 'unpin_block' is non-NULL, the new block can never fail to get a buffer. The semantics of this are:</p>
<ul>
<li>If 'unpin_block' is non-NULL, it must be pinned.</li>
<li>If the call succeeds, 'unpin_block' is unpinned.</li>
<li>If there is no memory pressure, block will get a newly allocated buffer.</li>
<li>If there is memory pressure, block will get the buffer from 'unpin_block'. </li>
</ul>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">382</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="object-pool_8h_source.html#l00042">impala::ObjectPool::Add()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00403">impala::BufferedBlockMgr::BufferDescriptor::block</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00222">impala::BufferedBlockMgr::Block::buffer_desc_</a>, <a class="el" href="status_8h_source.html#l00088">impala::Status::CANCELLED</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00228">impala::BufferedBlockMgr::Block::client_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00168">impala::BufferedBlockMgr::Block::DebugString()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00979">GetUnusedBlock()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00573">is_cancelled_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00277">impala::BufferedBlockMgr::Block::is_deleted_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00203">impala::BufferedBlockMgr::Block::is_pinned()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00270">impala::BufferedBlockMgr::Block::is_pinned_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00496">max_block_size_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00508">obj_pool_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00085">impala::BufferedBlockMgr::Client::PinBuffer()</a>, <a class="el" href="status_8h_source.html#l00242">RETURN_IF_ERROR</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00828">ReturnUnusedBlock()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00527">total_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00070">impala::BufferedBlockMgr::Client::tracker_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">TransferBuffer()</a>, <a class="el" href="mem-tracker_8h_source.html#l00163">impala::MemTracker::TryConsume()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00126">impala::BufferedBlockMgr::Block::Unpin()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00144">impala::BufferedBlockMgr::Block::Validate()</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00124">impala::BufferedBlockMgrTest::AllocateBlocks()</a>, <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00074">impala::BufferedBlockMgrTest::GetFreeBlock()</a>, <a class="el" href="hash-table_8cc_source.html#l00345">impala::HashTable::GrowNodeArray()</a>, <a class="el" href="buffered-tuple-stream_8cc_source.html#l00178">impala::BufferedTupleStream::NewBlockForWrite()</a>, and <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00144">impala::BufferedBlockMgrTest::TestRandomInternalImpl()</a>.</p>
</div>
</div>
<a class="anchor" id="a4477cc5ba95e9952329bb67c15585556"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int impala::BufferedBlockMgr::GetNumReservedBlocks </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 class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the number of blocks a block manager will reserve for its I/O buffers. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00331">331</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="tmp-file-mgr_8h_source.html#l00087">impala::TmpFileMgr::num_tmp_devices()</a>.</p>
</div>
</div>
<a class="anchor" id="a0cfc416ca77efffdbd943fabd773d706"></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_1_1Block.html">BufferedBlockMgr::Block</a> * impala::BufferedBlockMgr::GetUnusedBlock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</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>Checks unused_blocks_ for an unused block object, else allocates a new one. Non-blocking and needs no lock_. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00979">979</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="object-pool_8h_source.html#l00042">impala::ObjectPool::Add()</a>, <a class="el" href="runtime-profile_8h_source.html#l00093">impala::RuntimeProfile::Counter::Add()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00228">impala::BufferedBlockMgr::Block::client_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00583">created_block_counter_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00134">impala::BufferedBlockMgr::Block::Init()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00508">obj_pool_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00586">recycled_blocks_counter_</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00546">unused_blocks_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">GetNewBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a5bbad02d3a6e0184cad5d8682ece8dae"></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::Init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1DiskIoMgr.html">DiskIoMgr</a> *&#160;</td>
<td class="paramname"><em>io_mgr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classimpala_1_1RuntimeProfile.html">RuntimeProfile</a> *&#160;</td>
<td class="paramname"><em>profile</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> *&#160;</td>
<td class="paramname"><em>parent_tracker</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>mem_limit</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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>Initializes the block mgr. Idempotent and thread-safe. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">1105</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="runtime-profile_8h_source.html#l00047">ADD_COUNTER</a>, <a class="el" href="runtime-profile_8h_source.html#l00050">ADD_TIMER</a>, <a class="el" href="runtime-profile_8cc_source.html#l00368">impala::RuntimeProfile::AddChild()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00580">block_size_counter_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00595">buffer_wait_timer_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00589">buffered_pin_counter_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00598">bytes_written_counter_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00583">created_block_counter_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00592">disk_read_timer_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00641">encryption_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00604">encryption_timer_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00521">initialized_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00607">integrity_check_timer_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00568">io_request_context_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00496">max_block_size_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00579">mem_limit_counter_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00511">mem_tracker_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00508">obj_pool_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00601">outstanding_writes_counter_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00388">profile()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00576">profile_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00586">recycled_blocks_counter_</a>, <a class="el" href="disk-io-mgr_8cc_source.html#l00336">impala::DiskIoMgr::RegisterContext()</a>, and <a class="el" href="runtime-profile_8h_source.html#l00102">impala::RuntimeProfile::Counter::Set()</a>.</p>
</div>
</div>
<a class="anchor" id="a3c5fc9a51a790dba1ed1ff38af9e9ce7"></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_1Status.html">Status</a> impala::BufferedBlockMgr::InitTmpFiles </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>Initializes tmp_files_. This is initialized the first time we need to write to disk. Must be called with lock_ taken. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l01147">1147</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="tmp-file-mgr_8cc_source.html#l00088">impala::TmpFileMgr::GetFile()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00564">next_block_index_</a>, <a class="el" href="tmp-file-mgr_8h_source.html#l00087">impala::TmpFileMgr::num_tmp_devices()</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00506">query_id_</a>, <a class="el" href="status_8h_source.html#l00242">RETURN_IF_ERROR</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00560">tmp_files_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="ac6e6d613d4ed039d310d789ead20e231"></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::max_block_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>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00386">386</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#l00496">max_block_size_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00278">ConsumeMemory()</a>, <a class="el" href="hash-table_8cc_source.html#l00345">impala::HashTable::GrowNodeArray()</a>, <a class="el" href="sorter_8cc_source.html#l00896">impala::Sorter::Init()</a>, <a class="el" href="buffered-tuple-stream_8cc_source.html#l00116">impala::BufferedTupleStream::Init()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00198">impala::BufferedBlockMgr::Block::is_max_size()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00369">MemLimitTooLowError()</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#l00227">remaining_unreserved_buffers()</a>, and <a class="el" href="buffered-tuple-stream_8cc_source.html#l00136">impala::BufferedTupleStream::SwitchToIoBuffers()</a>.</p>
</div>
</div>
<a class="anchor" id="a56f3200d738096167c3e6a50d077ced8"></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::MemLimitTooLowError </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a MEM_LIMIT_EXCEEDED error which includes the minimum memory required by this client. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00369">369</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="status_8cc_source.html#l00166">impala::Status::AddDetail()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00102">impala::BufferedBlockMgr::Client::DebugString()</a>, <a class="el" href="debug-util_8cc_source.html#l00246">impala::GetStackTrace()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00386">max_block_size()</a>, <a class="el" href="status_8h_source.html#l00089">impala::Status::MEM_LIMIT_EXCEEDED</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00077">impala::BufferedBlockMgr::Client::num_reserved_buffers_</a>, <a class="el" href="pretty-printer_8h_source.html#l00033">impala::PrettyPrinter::Print()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00506">query_id_</a>, and <a class="el" href="logging_8h_source.html#l00057">VLOG_QUERY</a>.</p>
<p>Referenced by <a class="el" href="buffered-tuple-stream_8cc_source.html#l00116">impala::BufferedTupleStream::Init()</a>, <a class="el" href="partitioned-hash-join-node_8cc_source.html#l00450">impala::PartitionedHashJoinNode::SpillPartition()</a>, and <a class="el" href="partitioned-aggregation-node_8cc_source.html#l00872">impala::PartitionedAggregationNode::SpillPartition()</a>.</p>
</div>
</div>
<a class="anchor" id="a4cb1e195174c2f3fded3cdae639af303"></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::num_free_buffers </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#l00381">381</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#l00553">free_io_buffers_</a>.</p>
<p>Referenced by <a class="el" href="sorter_8cc_source.html#l00949">impala::Sorter::InputDone()</a>.</p>
</div>
</div>
<a class="anchor" id="a342aa2bcf74c09ab57718e5fd8681f96"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int impala::BufferedBlockMgr::num_pinned_buffers </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00514">514</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#l00083">impala::BufferedBlockMgr::Client::num_pinned_buffers_</a>.</p>
<p>Referenced by <a class="el" href="partitioned-aggregation-node_8cc_source.html#l00771">impala::PartitionedAggregationNode::NextPartition()</a>.</p>
</div>
</div>
<a class="anchor" id="a823f6e86cee0f174f0ad36c3d253b287"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int impala::BufferedBlockMgr::num_reserved_buffers_remaining </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00518">518</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#l00083">impala::BufferedBlockMgr::Client::num_pinned_buffers_</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00077">impala::BufferedBlockMgr::Client::num_reserved_buffers_</a>.</p>
<p>Referenced by <a class="el" href="partitioned-aggregation-node_8cc_source.html#l00729">impala::PartitionedAggregationNode::CreateHashPartitions()</a>.</p>
</div>
</div>
<a class="anchor" id="a897cbbbcebeb8e8399d03053908030fe"></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_1Status.html">Status</a> impala::BufferedBlockMgr::PinBlock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</em>, </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>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>src</em>, </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>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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><a class="el" href="classimpala_1_1BufferedBlockMgr.html#a897cbbbcebeb8e8399d03053908030fe">PinBlock()</a>, <a class="el" href="classimpala_1_1BufferedBlockMgr.html#af603b95283cb5edcfc9a781a387bdb43">UnpinBlock()</a>, <a class="el" href="classimpala_1_1BufferedBlockMgr.html#a87fe1fd37d2ee3599b8bbb81dc80aa2b">DeleteBlock()</a> perform the actual work of <a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html#a1d46ffe7b416a949b6fdb6e7828c3301">Block::Pin()</a>, Unpin() and Delete(). Must be called with the lock_ taken. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">536</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="object-pool_8h_source.html#l00042">impala::ObjectPool::Add()</a>, <a class="el" href="disk-io-mgr_8cc_source.html#l00455">impala::DiskIoMgr::AddScanRanges()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00181">impala::BufferedBlockMgr::Block::buffer()</a>, <a class="el" href="disk-io-mgr_8h_source.html#l00199">impala::DiskIoMgr::BufferDescriptor::buffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00222">impala::BufferedBlockMgr::Block::buffer_desc_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00647">check_integrity_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00228">impala::BufferedBlockMgr::Block::client_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00168">impala::BufferedBlockMgr::Block::DebugString()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01239">Decrypt()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00528">DeleteOrUnpinBlock()</a>, <a class="el" href="disk-io-mgr_8h_source.html#l00269">impala::DiskIoMgr::RequestRange::disk_id()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00592">disk_read_timer_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00641">encryption_</a>, <a class="el" href="disk-io-mgr_8h_source.html#l00202">impala::DiskIoMgr::BufferDescriptor::eosr()</a>, <a class="el" href="disk-io-mgr_8h_source.html#l00266">impala::DiskIoMgr::RequestRange::file()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00553">free_io_buffers_</a>, <a class="el" href="disk-io-mgr-scan-range_8cc_source.html#l00070">impala::DiskIoMgr::ScanRange::GetNext()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00274">impala::BufferedBlockMgr::Block::in_write_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00567">io_mgr_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00568">io_request_context_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00277">impala::BufferedBlockMgr::Block::is_deleted_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00270">impala::BufferedBlockMgr::Block::is_pinned_</a>, <a class="el" href="disk-io-mgr_8h_source.html#l00201">impala::DiskIoMgr::BufferDescriptor::len()</a>, <a class="el" href="disk-io-mgr_8h_source.html#l00268">impala::DiskIoMgr::RequestRange::len()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>, <a class="el" href="disk-io-mgr_8h_source.html#l00299">impala::DiskIoMgr::ScanRange::NEVER_CACHE</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00508">obj_pool_</a>, <a class="el" href="partitioning-throughput-test_8cc_source.html#l00037">offset</a>, <a class="el" href="disk-io-mgr_8h_source.html#l00267">impala::DiskIoMgr::RequestRange::offset()</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00085">impala::BufferedBlockMgr::Client::PinBuffer()</a>, <a class="el" href="disk-io-mgr-scan-range_8cc_source.html#l00215">impala::DiskIoMgr::ScanRange::Reset()</a>, <a class="el" href="disk-io-mgr_8cc_source.html#l00182">impala::DiskIoMgr::BufferDescriptor::Return()</a>, <a class="el" href="status_8h_source.html#l00242">RETURN_IF_ERROR</a>, <a class="el" href="runtime-profile_8h_source.html#l00053">SCOPED_TIMER</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00527">total_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">TransferBuffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00540">unpinned_blocks_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00239">impala::BufferedBlockMgr::Block::valid_data_len_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01290">VerifyHash()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00236">impala::BufferedBlockMgr::Block::write_range_</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>.</p>
</div>
</div>
<a class="anchor" id="af4157a6d2c9c4541b172ff653ce55d7b"></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_1RuntimeProfile.html">RuntimeProfile</a>* impala::BufferedBlockMgr::profile </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#l00388">388</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#l00576">profile_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00199">Create()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>.</p>
</div>
</div>
<a class="anchor" id="a52bd5a104f158068d4627f8451dcde76"></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::RegisterClient </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>num_reserved_buffers</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a> *&#160;</td>
<td class="paramname"><em>tracker</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classimpala_1_1RuntimeState.html">RuntimeState</a> *&#160;</td>
<td class="paramname"><em>state</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> **&#160;</td>
<td class="paramname"><em>client</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers a client with num_reserved_buffers. The returned client is owned by the <a class="el" href="classimpala_1_1BufferedBlockMgr.html">BufferedBlockMgr</a> and has the same lifetime as it. We allow oversubscribing the reserved buffers. It is likely that the num_reserved_buffers will be very pessimistic for small queries and we don't want to fail all of them with mem limit exceeded. The min reserved buffers is often independent of data size and we still want to run small queries with very small limits. If tracker is non-NULL, buffers used by this client are reflected in tracker. TODO: The fact that we allow oversubscription is problematic. as the code expects the reservations to always be granted (currently not the case). </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00235">235</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="object-pool_8h_source.html#l00042">impala::ObjectPool::Add()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00392">Client</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00508">obj_pool_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00524">unfullfilled_reserved_buffers_</a>.</p>
<p>Referenced by <a class="el" href="sorter_8cc_source.html#l00896">impala::Sorter::Init()</a>, <a class="el" href="analytic-eval-node_8cc_source.html#l00166">impala::AnalyticEvalNode::Open()</a>, <a class="el" href="partitioned-hash-join-node_8cc_source.html#l00094">impala::PartitionedHashJoinNode::Prepare()</a>, <a class="el" href="partitioned-aggregation-node_8cc_source.html#l00095">impala::PartitionedAggregationNode::Prepare()</a>, and <a class="el" href="buffered-block-mgr-test_8cc_source.html#l00144">impala::BufferedBlockMgrTest::TestRandomInternalImpl()</a>.</p>
</div>
</div>
<a class="anchor" id="a794a503c56450c23960e10144a3ee25f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void impala::BufferedBlockMgr::ReleaseMemory </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>All successful allocates bytes from <a class="el" href="classimpala_1_1BufferedBlockMgr.html#a52695550d255f216048e336d91d526bc">ConsumeMemory()</a> must have a corresponding <a class="el" href="classimpala_1_1BufferedBlockMgr.html#a794a503c56450c23960e10144a3ee25f">ReleaseMemory()</a> call. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00354">354</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_8h_source.html#l00511">mem_tracker_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00074">impala::BufferedBlockMgr::Client::query_tracker_</a>, <a class="el" href="mem-tracker_8h_source.html#l00155">impala::MemTracker::ReleaseLocal()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00070">impala::BufferedBlockMgr::Client::tracker_</a>.</p>
<p>Referenced by <a class="el" href="hash-table_8cc_source.html#l00257">impala::HashTable::Close()</a>, and <a class="el" href="hash-table_8cc_source.html#l00293">impala::HashTable::ResizeBuckets()</a>.</p>
</div>
</div>
<a class="anchor" id="a3cf3eda5223c4487cd54eb54aabace9f"></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::remaining_unreserved_buffers </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>Returns the total number of unreserved buffers. This is the sum of unpinned, free and buffers we can still allocate minus the total number of reserved buffers that are not pinned. Note this can be negative if the buffers are oversubscribed. Must be called with lock_ taken. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00227">227</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_8h_source.html#l00553">free_io_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00386">max_block_size()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00511">mem_tracker_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00531">non_local_outstanding_writes_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00524">unfullfilled_reserved_buffers_</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00540">unpinned_blocks_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00221">available_buffers()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00278">ConsumeMemory()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a57538dda5ea4f7a2a43a5a2fbaf63bca"></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::ReturnUnusedBlock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</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>Returns a deleted block to the list of free blocks. Assumes the block's buffer has already been returned to the free buffers list. Non-blocking. Thread-safe and does not need the lock_ acquired. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00828">828</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_8h_source.html#l00222">impala::BufferedBlockMgr::Block::buffer_desc_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00168">impala::BufferedBlockMgr::Block::DebugString()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00134">impala::BufferedBlockMgr::Block::Init()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00277">impala::BufferedBlockMgr::Block::is_deleted_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00270">impala::BufferedBlockMgr::Block::is_pinned_</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00546">unused_blocks_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">TransferBuffer()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>.</p>
</div>
</div>
<a class="anchor" id="a7df535bed5b54f21c6b2d7478277f3f5"></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::SetHash </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</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>Takes a cryptographic hash of the data and sets hash_ with it. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l01275">1275</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_8h_source.html#l00181">impala::BufferedBlockMgr::Block::buffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00647">check_integrity_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00247">impala::BufferedBlockMgr::Block::encrypted_write_buffer_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00641">encryption_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00263">impala::BufferedBlockMgr::Block::hash_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00607">integrity_check_timer_</a>, <a class="el" href="runtime-profile_8h_source.html#l00053">SCOPED_TIMER</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00239">impala::BufferedBlockMgr::Block::valid_data_len_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a09e13d36c3908c8f988ba5564f63d70b"></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_1Status.html">Status</a> impala::BufferedBlockMgr::TransferBuffer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>dst</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>src</em>, </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>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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>Transfers the buffer from 'src' to 'dst'. 'src' must be pinned. If unpin == false, 'src' is simply deleted. If unpin == true, 'src' is unpinned and it may block until the write of 'src' is completed. In that case it will use the lock_ for the condvar. Thus, the lock_ needs to not have been taken when this function is called. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">440</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_8h_source.html#l00403">impala::BufferedBlockMgr::BufferDescriptor::block</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00222">impala::BufferedBlockMgr::Block::buffer_desc_</a>, <a class="el" href="status_8h_source.html#l00088">impala::Status::CANCELLED</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00288">impala::BufferedBlockMgr::Block::client_local_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00274">impala::BufferedBlockMgr::Block::in_write_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00573">is_cancelled_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00277">impala::BufferedBlockMgr::Block::is_deleted_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00270">impala::BufferedBlockMgr::Block::is_pinned_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00400">impala::BufferedBlockMgr::BufferDescriptor::len</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00496">max_block_size_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="status_8h_source.html#l00172">impala::Status::ok()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00828">ReturnUnusedBlock()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00283">impala::BufferedBlockMgr::Block::write_complete_cv_</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">GetNewBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="aa9b3d1904de97e5829b8d8fe880ba506"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classbool.html">bool</a> impala::BufferedBlockMgr::TryAcquireTmpReservation </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</a> *&#160;</td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>num_buffers</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Tries to acquire a one-time reservation of num_buffers. The semantics are:</p>
<ul>
<li>If this call fails, the next 'num_buffers' calls to Pin()/GetNewBlock() might not have enough memory.</li>
<li>If this call succeeds, the next 'num_buffers' call to Pin()/GetNewBlock() will be guaranteed to get the block. Once these blocks have been pinned, the reservation from this call has no more effect. Blocks coming from the tmp reservation also count towards the regular reservation. This is useful to Pin() a number of blocks and guarantee all or nothing behavior. </li>
</ul>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00257">257</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#l00221">available_buffers()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00083">impala::BufferedBlockMgr::Client::num_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00077">impala::BufferedBlockMgr::Client::num_reserved_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00080">impala::BufferedBlockMgr::Client::num_tmp_reserved_buffers_</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00524">unfullfilled_reserved_buffers_</a>.</p>
<p>Referenced by <a class="el" href="buffered-tuple-stream_8cc_source.html#l00357">impala::BufferedTupleStream::PinStream()</a>.</p>
</div>
</div>
<a class="anchor" id="af603b95283cb5edcfc9a781a387bdb43"></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_1Status.html">Status</a> impala::BufferedBlockMgr::UnpinBlock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</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#l00618">618</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_8h_source.html#l00222">impala::BufferedBlockMgr::Block::buffer_desc_</a>, <a class="el" href="status_8h_source.html#l00088">impala::Status::CANCELLED</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00228">impala::BufferedBlockMgr::Block::client_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00168">impala::BufferedBlockMgr::Block::DebugString()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00274">impala::BufferedBlockMgr::Block::in_write_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00573">is_cancelled_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00277">impala::BufferedBlockMgr::Block::is_deleted_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00270">impala::BufferedBlockMgr::Block::is_pinned_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00400">impala::BufferedBlockMgr::BufferDescriptor::len</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00496">max_block_size_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00083">impala::BufferedBlockMgr::Client::num_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00077">impala::BufferedBlockMgr::Client::num_reserved_buffers_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="status_8h_source.html#l00242">RETURN_IF_ERROR</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00527">total_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00524">unfullfilled_reserved_buffers_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00093">impala::BufferedBlockMgr::Client::UnpinBuffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00540">unpinned_blocks_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00144">impala::BufferedBlockMgr::Block::Validate()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>.</p>
</div>
</div>
<a class="anchor" id="a6e3d9f82322d2dbec44a0d194ad579d7"></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::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>Used to debug the state of the block manager. Lock must already be taken. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">995</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_8h_source.html#l00406">impala::BufferedBlockMgr::BufferDescriptor::all_buffers_it</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00556">all_io_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00403">impala::BufferedBlockMgr::BufferDescriptor::block</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00500">block_write_threshold_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00222">impala::BufferedBlockMgr::Block::buffer_desc_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00168">impala::BufferedBlockMgr::Block::DebugString()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00504">disable_spill_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00553">free_io_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00274">impala::BufferedBlockMgr::Block::in_write_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00573">is_cancelled_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00270">impala::BufferedBlockMgr::Block::is_pinned_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00400">impala::BufferedBlockMgr::BufferDescriptor::len</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00496">max_block_size_</a>, <a class="el" href="internal-queue_8h_source.html#l00048">impala::InternalQueue&lt; T &gt;::Node::Next()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00531">non_local_outstanding_writes_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00527">total_pinned_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00540">unpinned_blocks_</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00144">impala::BufferedBlockMgr::Block::Validate()</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00278">ConsumeMemory()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">UnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>.</p>
</div>
</div>
<a class="anchor" id="a784e8ae0194fbf99b7f16731ef317711"></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_1Status.html">Status</a> impala::BufferedBlockMgr::VerifyHash </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</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>Verifies that the contents of buffer() match those that were set by <a class="el" href="classimpala_1_1BufferedBlockMgr.html#a7df535bed5b54f21c6b2d7478277f3f5" title="Takes a cryptographic hash of the data and sets hash_ with it. ">SetHash()</a> </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l01290">1290</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_8h_source.html#l00181">impala::BufferedBlockMgr::Block::buffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00647">check_integrity_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00263">impala::BufferedBlockMgr::Block::hash_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00607">integrity_check_timer_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="runtime-profile_8h_source.html#l00053">SCOPED_TIMER</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00239">impala::BufferedBlockMgr::Block::valid_data_len_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a4f58a54274252c7bb3c54e2317630933"></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::WriteComplete </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classimpala_1_1Status.html">Status</a> &amp;&#160;</td>
<td class="paramname"><em>write_status</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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>Callback used by <a class="el" href="classimpala_1_1DiskIoMgr.html">DiskIoMgr</a> to indicate a block write has completed. write_status is the status of the write. is_cancelled_ is set to true if write_status is not <a class="el" href="classimpala_1_1Status.html#a580565665ea944eb64f3f495b1bee1e0">Status::OK</a> or a re-issue of the write fails. Returns the block's buffer to the free buffers list if it is no longer pinned. Returns the block itself to the free blocks list if it has been deleted. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">715</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="runtime-profile_8h_source.html#l00093">impala::RuntimeProfile::Counter::Add()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00403">impala::BufferedBlockMgr::BufferDescriptor::block</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00534">buffer_available_cv_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00222">impala::BufferedBlockMgr::Block::buffer_desc_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00228">impala::BufferedBlockMgr::Block::client_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00288">impala::BufferedBlockMgr::Block::client_local_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00168">impala::BufferedBlockMgr::Block::DebugString()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01233">EncryptDone()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00641">encryption_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00553">free_io_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00274">impala::BufferedBlockMgr::Block::in_write_</a>, <a class="el" href="runtime-state_8h_source.html#l00235">impala::RuntimeState::is_cancelled()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00573">is_cancelled_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00277">impala::BufferedBlockMgr::Block::is_deleted_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00270">impala::BufferedBlockMgr::Block::is_pinned_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00400">impala::BufferedBlockMgr::BufferDescriptor::len</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00518">lock_</a>, <a class="el" href="runtime-state_8cc_source.html#l00224">impala::RuntimeState::LogError()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00496">max_block_size_</a>, <a class="el" href="status_8h_source.html#l00189">impala::Status::msg()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00531">non_local_outstanding_writes_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="status_8h_source.html#l00172">impala::Status::ok()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00601">outstanding_writes_counter_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00506">query_id_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00828">ReturnUnusedBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00061">impala::BufferedBlockMgr::Client::state_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, <a class="el" href="logging_8h_source.html#l00057">VLOG_QUERY</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00283">impala::BufferedBlockMgr::Block::write_complete_cv_</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="ab7d678eeb63832623e3028e379879af2"></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::writes_issued </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#l00389">389</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#l00610">writes_issued_</a>.</p>
</div>
</div>
<a class="anchor" id="a838b49f1c3c947a078d500baf6d93ae5"></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_1Status.html">Status</a> impala::BufferedBlockMgr::WriteUnpinnedBlock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a> *&#160;</td>
<td class="paramname"><em>block</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>Issues the write for this block to the <a class="el" href="classimpala_1_1DiskIoMgr.html">DiskIoMgr</a>. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">659</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="object-pool_8h_source.html#l00042">impala::ObjectPool::Add()</a>, <a class="el" href="runtime-profile_8h_source.html#l00093">impala::RuntimeProfile::Counter::Add()</a>, <a class="el" href="disk-io-mgr_8cc_source.html#l01103">impala::DiskIoMgr::AddWriteRange()</a>, <a class="el" href="tmp-file-mgr_8cc_source.html#l00110">impala::TmpFileMgr::File::AllocateSpace()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00181">impala::BufferedBlockMgr::Block::buffer()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00222">impala::BufferedBlockMgr::Block::buffer_desc_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00598">bytes_written_counter_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00647">check_integrity_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00168">impala::BufferedBlockMgr::Block::DebugString()</a>, <a class="el" href="tmp-file-mgr_8h_source.html#l00045">impala::TmpFileMgr::File::disk_id()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01183">Encrypt()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00641">encryption_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00274">impala::BufferedBlockMgr::Block::in_write_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01147">InitTmpFiles()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00567">io_mgr_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00568">io_request_context_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00270">impala::BufferedBlockMgr::Block::is_pinned_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00400">impala::BufferedBlockMgr::BufferDescriptor::len</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00496">max_block_size_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00564">next_block_index_</a>, <a class="el" href="disk-io-mgr_8h_source.html#l00599">impala::DiskIoMgr::num_local_disks()</a>, <a class="el" href="impalad-metrics_8h_source.html#l00130">impala::ImpaladMetrics::NUM_QUERIES_SPILLED</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00508">obj_pool_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00601">outstanding_writes_counter_</a>, <a class="el" href="tmp-file-mgr_8h_source.html#l00044">impala::TmpFileMgr::File::path()</a>, <a class="el" href="status_8h_source.html#l00242">RETURN_IF_ERROR</a>, <a class="el" href="disk-io-mgr_8cc_source.html#l00205">impala::DiskIoMgr::WriteRange::SetData()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01275">SetHash()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00560">tmp_files_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00239">impala::BufferedBlockMgr::Block::valid_data_len_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00144">impala::BufferedBlockMgr::Block::Validate()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00236">impala::BufferedBlockMgr::Block::write_range_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00610">writes_issued_</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">TransferBuffer()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>.</p>
</div>
</div>
<a class="anchor" id="a9e3f63dec76e5f906fd50a011263988f"></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_1Status.html">Status</a> impala::BufferedBlockMgr::WriteUnpinnedBlocks </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>Writes unpinned blocks via <a class="el" href="classimpala_1_1DiskIoMgr.html">DiskIoMgr</a> until one of the following is true: 1) The number of outstanding writes &gt;= (block_write_threshold_ - num free buffers) 2) There are no more unpinned blocks Must be called with the lock_ already taken. Is not blocking. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">643</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_8h_source.html#l00500">block_write_threshold_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00288">impala::BufferedBlockMgr::Block::client_local_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00504">disable_spill_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00553">free_io_buffers_</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00531">non_local_outstanding_writes_</a>, <a class="el" href="status_8h_source.html#l00087">impala::Status::OK</a>, <a class="el" href="status_8h_source.html#l00242">RETURN_IF_ERROR</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00540">unpinned_blocks_</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
<p>Referenced by <a class="el" href="buffered-block-mgr_8cc_source.html#l00278">ConsumeMemory()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">UnpinBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>.</p>
</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="a9bee35b146080ab7239cc8aff02333c3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">friend struct <a class="el" href="structimpala_1_1BufferedBlockMgr_1_1Client.html">Client</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#l00392">392</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#l00235">RegisterClient()</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="acf728961e82fb837311be3143ac369e0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::list&lt;<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1BufferDescriptor.html">BufferDescriptor</a>*&gt; impala::BufferedBlockMgr::all_io_buffers_</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>All allocated io-sized buffers. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00556">556</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#l00380">available_allocated_buffers()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00278">ConsumeMemory()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00481">~BufferedBlockMgr()</a>.</p>
</div>
</div>
<a class="anchor" id="acb4438f9c5fca33d44facd350ada51ff"></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_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a>* impala::BufferedBlockMgr::block_size_counter_</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_8h_source.html#l00580">580</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#l01105">Init()</a>.</p>
</div>
</div>
<a class="anchor" id="a6bfcfda8f2e29c07a4f050a6c07fd808"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const int impala::BufferedBlockMgr::block_write_threshold_</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>Unpinned blocks are written when the number of free buffers is below this threshold. Equal to the number of disks. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00500">500</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#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>.</p>
</div>
</div>
<a class="anchor" id="ad13df5bfb8825411a1c2579879a35eab"></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::buffer_available_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>Signal availability of free buffers. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00534">534</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">DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">FindBuffer()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>.</p>
</div>
</div>
<a class="anchor" id="a3b9871b3b2a381b5ecbbb37d7144b612"></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_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a>* impala::BufferedBlockMgr::buffer_wait_timer_</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>Time spent waiting for a free buffer. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00595">595</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#l00936">FindBuffer()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>.</p>
</div>
</div>
<a class="anchor" id="a4cc209237769542b3b75810332f7e3fd"></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_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a>* impala::BufferedBlockMgr::buffered_pin_counter_</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 Pin() calls that did not require a disk read. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00589">589</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#l00836">FindBufferForBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>.</p>
</div>
</div>
<a class="anchor" id="af2ad74e4f63345951f3d9538d8e35307"></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_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a>* impala::BufferedBlockMgr::bytes_written_counter_</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 bytes written to disk (includes writes still queued in the IO manager). </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00598">598</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#l01105">Init()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a7f7694664dd89a64c9e036bdcdc078e2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classbool.html">bool</a> impala::BufferedBlockMgr::check_integrity_</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>Set to true if &ndash;disk_spill_encryption is true. We can split this into a different flag in the future, but there is little performance overhead in the integrity check and hence no real reason to keep this separate from encryption. When true, blocks will have an integrity check (SHA-256) performed after being read from disk. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00647">647</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">PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01275">SetHash()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01290">VerifyHash()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="ad679d4aee028b2611a6c0cadb63d6ba5"></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_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a>* impala::BufferedBlockMgr::created_block_counter_</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>Total number of blocks created. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00583">583</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#l00979">GetUnusedBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>.</p>
</div>
</div>
<a class="anchor" id="a5fb791cacf01816b470330d014469f4e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classbool.html">bool</a> impala::BufferedBlockMgr::disable_spill_</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, spilling is disabled. The client calls will fail if there is not enough memory. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00504">504</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#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>.</p>
</div>
</div>
<a class="anchor" id="ad30d1250c262dd05e6090b37d4af35f2"></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_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a>* impala::BufferedBlockMgr::disk_read_timer_</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>Time taken for disk reads. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00592">592</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#l01105">Init()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="aff37530220851e59a6483912ab2c475f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classbool.html">bool</a> impala::BufferedBlockMgr::encryption_</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>Set to true if &ndash;disk_spill_encryption is true. When true, blocks will be encrypted before being written to disk. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00641">641</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">Decrypt()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01183">Encrypt()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01233">EncryptDone()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01275">SetHash()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a7c5d8f0b89fabd62f3fc640f94643948"></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_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a>* impala::BufferedBlockMgr::encryption_timer_</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>Time spent in disk spill encryption and decryption. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00604">604</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">Decrypt()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01183">Encrypt()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>.</p>
</div>
</div>
<a class="anchor" id="ad77e0ded5dd0baa97ec5aca3be0c4857"></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_1InternalQueue.html">InternalQueue</a>&lt;<a class="el" href="structimpala_1_1BufferedBlockMgr_1_1BufferDescriptor.html">BufferDescriptor</a>&gt; impala::BufferedBlockMgr::free_io_buffers_</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>List of buffers that can be assigned to a block in Pin() or <a class="el" href="classimpala_1_1BufferedBlockMgr.html#ac4ddea92960294d8f764c2974fe273f9">GetNewBlock()</a>. These buffers either have no block associated with them or are associated with an an unpinned block that has been persisted. That is, either block = NULL or (!block-&gt;is_pinned_ &amp;&amp; !block-&gt;in_write_ &amp;&amp; !unpinned_blocks_.Contains(block)). All of these buffers are io sized. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00553">553</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#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00381">num_free_buffers()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00227">remaining_unreserved_buffers()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>.</p>
</div>
</div>
<a class="anchor" id="a1a67f888364fd4e95aca80801781f958"></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::initialized_</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, <a class="el" href="classimpala_1_1BufferedBlockMgr.html#a5bbad02d3a6e0184cad5d8682ece8dae" title="Initializes the block mgr. Idempotent and thread-safe. ">Init()</a> has been called. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00521">521</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#l01105">Init()</a>.</p>
</div>
</div>
<a class="anchor" id="ab67107d799775549a42f5be44c8b04d4"></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_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a>* impala::BufferedBlockMgr::integrity_check_timer_</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>Time spent in disk spill integrity generation and checking. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00607">607</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#l01105">Init()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01275">SetHash()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l01290">VerifyHash()</a>.</p>
</div>
</div>
<a class="anchor" id="a3727560d3056edc8f0d6f67c30b18a8a"></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.html">DiskIoMgr</a>* impala::BufferedBlockMgr::io_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><a class="el" href="classimpala_1_1DiskIoMgr.html">DiskIoMgr</a> handles to read and write blocks. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00567">567</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#l00359">Cancel()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00481">~BufferedBlockMgr()</a>.</p>
</div>
</div>
<a class="anchor" id="a3fa292d642eacb664388d07792294f9b"></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_1RequestContext.html">DiskIoMgr::RequestContext</a>* impala::BufferedBlockMgr::io_request_context_</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_8h_source.html#l00568">568</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#l00359">Cancel()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00481">~BufferedBlockMgr()</a>.</p>
</div>
</div>
<a class="anchor" id="aaaa53b664c5ec1265c89b25afd70aa04"></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::is_cancelled_</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, a disk write failed and all API calls return. <a class="el" href="classimpala_1_1Status.html#a318b69bf42d4d23f7ae71a8006efb85b">Status::CANCELLED</a>. Set to true if there was an error writing a block, or if <a class="el" href="classimpala_1_1BufferedBlockMgr.html#a4f58a54274252c7bb3c54e2317630933">WriteComplete()</a> needed to reissue the write and that failed. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00573">573</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#l00359">Cancel()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00528">DeleteOrUnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">TransferBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">UnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>.</p>
</div>
</div>
<a class="anchor" id="a9e66c366444d815acc70271ee38bdd19"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">boost::mutex impala::BufferedBlockMgr::lock_</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>This lock protects the block and buffer lists below, except for unused_blocks_. It also protects the various counters and changes to block state. Additionally, it is used for the blocking condvars: buffer_available_cv_ and block-&gt;write_complete_cv_. TODO: We should break the protection of the various structures and usages to different spinlocks and a mutex to be used in the wait()s, see IMPALA-1883. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00518">518</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#l00359">Cancel()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00244">ClearReservations()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00272">ClearTmpReservation()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00278">ConsumeMemory()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01082">DebugString()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00528">DeleteOrUnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00235">RegisterClient()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">TransferBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00257">TryAcquireTmpReservation()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">UnpinBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>.</p>
</div>
</div>
<a class="anchor" id="af689303917eaaf85ce4ad0a44d6e6c43"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const int64_t impala::BufferedBlockMgr::max_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>Size of the largest/default block in bytes. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00496">496</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#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>, <a class="el" href="buffered-block-mgr_8h_source.html#l00386">max_block_size()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00440">TransferBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">UnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a7c9ada787430720de06f3eafc47af53e"></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_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a>* impala::BufferedBlockMgr::mem_limit_counter_</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>These have a fixed value for the lifetime of the manager and show memory usage. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00579">579</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#l01105">Init()</a>.</p>
</div>
</div>
<a class="anchor" id="ac215127b6c5f5ea3f80500ced986d5ae"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">boost::scoped_ptr&lt;<a class="el" href="classimpala_1_1MemTracker.html">MemTracker</a>&gt; impala::BufferedBlockMgr::mem_tracker_</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>Track buffers allocated by the block manager. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00511">511</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#l00510">bytes_allocated()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00278">ConsumeMemory()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00354">ReleaseMemory()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00227">remaining_unreserved_buffers()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00481">~BufferedBlockMgr()</a>.</p>
</div>
</div>
<a class="anchor" id="a4b942031de4227fa6abc6d6b253dbc5b"></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::next_block_index_</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>Index into tmp_files_ denoting the file to which the next block to be persisted will be written. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00564">564</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#l01147">InitTmpFiles()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a55327b51166c1dced4425ecdf1b93658"></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::non_local_outstanding_writes_</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 outstanding writes (Writes issued but not completed). This does not include client-local writes. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00531">531</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#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00227">remaining_unreserved_buffers()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00481">~BufferedBlockMgr()</a>.</p>
</div>
</div>
<a class="anchor" id="aa4ef162071abe0ae88c47e58a64e260b"></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_1ObjectPool.html">ObjectPool</a> impala::BufferedBlockMgr::obj_pool_</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_8h_source.html#l00508">508</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#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00979">GetUnusedBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00235">RegisterClient()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="aeb7806c5773497699e3d880a3770a140"></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_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a>* impala::BufferedBlockMgr::outstanding_writes_counter_</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 writes outstanding (issued but not completed). </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00601">601</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#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a555fb8f4857bdab650895b4468332c53"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">boost::scoped_ptr&lt;<a class="el" href="classimpala_1_1RuntimeProfile.html">RuntimeProfile</a>&gt; impala::BufferedBlockMgr::profile_</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>Counters and timers to track behavior. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00576">576</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#l01105">Init()</a>, and <a class="el" href="buffered-block-mgr_8h_source.html#l00388">profile()</a>.</p>
</div>
</div>
<a class="anchor" id="a4da642021a8ff01b90040b228cba10bd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const TUniqueId impala::BufferedBlockMgr::query_id_</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_8h_source.html#l00506">506</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#l00278">ConsumeMemory()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01147">InitTmpFiles()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00369">MemLimitTooLowError()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00715">WriteComplete()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00481">~BufferedBlockMgr()</a>.</p>
</div>
</div>
<a class="anchor" id="a2c0051cb9c4a7f374477f2e0bdfe50f5"></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#aed8676a9964f72975b1f5b54983d2b03">BufferedBlockMgr::BlockMgrsMap</a> impala::BufferedBlockMgr::query_to_block_mgrs_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00621">621</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#l00199">Create()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00481">~BufferedBlockMgr()</a>.</p>
</div>
</div>
<a class="anchor" id="a267ba7ea2b63d43fc37d5db79ceda533"></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_1RuntimeProfile_1_1Counter.html">RuntimeProfile::Counter</a>* impala::BufferedBlockMgr::recycled_blocks_counter_</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 deleted blocks reused. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00586">586</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#l00979">GetUnusedBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l01105">Init()</a>.</p>
</div>
</div>
<a class="anchor" id="a0dc5bc091c0ec45b24ae37e2da2bab5d"></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_1SpinLock.html">SpinLock</a> impala::BufferedBlockMgr::static_block_mgrs_lock_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Protects query_to_block_mgrs_. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00613">613</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#l00199">Create()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00481">~BufferedBlockMgr()</a>.</p>
</div>
</div>
<a class="anchor" id="ae3ca8baeb5e41ff28afbabc22d6d7e29"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">boost::ptr_vector&lt;<a class="el" href="classimpala_1_1TmpFileMgr_1_1File.html">TmpFileMgr::File</a>&gt; impala::BufferedBlockMgr::tmp_files_</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>Temporary physical file handle, (one per tmp device) to which blocks may be written. Blocks are round-robined across these files. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00560">560</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#l01147">InitTmpFiles()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">WriteUnpinnedBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00481">~BufferedBlockMgr()</a>.</p>
</div>
</div>
<a class="anchor" id="ad4f1123a87993beb9355cacd8ad4368f"></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::total_pinned_buffers_</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 total number of pinned buffers across all clients. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00527">527</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#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00382">GetNewBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">UnpinBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>.</p>
</div>
</div>
<a class="anchor" id="a871bf9c1ca694f278d16af94bd6dd9a7"></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::unfullfilled_reserved_buffers_</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 total number of reserved buffers across all clients that are not pinned. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00524">524</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#l00244">ClearReservations()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00272">ClearTmpReservation()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00278">ConsumeMemory()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00235">RegisterClient()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00227">remaining_unreserved_buffers()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00257">TryAcquireTmpReservation()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">UnpinBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="acee7e11e770fcceb10f9774a19aa0da3"></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_1InternalQueue.html">InternalQueue</a>&lt;<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a>&gt; impala::BufferedBlockMgr::unpinned_blocks_</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>List of blocks is_pinned_ = false AND are not on <a class="el" href="classimpala_1_1DiskIoMgr.html">DiskIoMgr</a>'s write queue. Blocks are added to and removed from the back of the list. (i.e. in LIFO order). Blocks in this list must have is_pinned_ = false, in_write_ = false, is_deleted_ = false. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00540">540</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#l01090">DebugInternal()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00783">DeleteBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00936">FindBuffer()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00836">FindBufferForBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00536">PinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00227">remaining_unreserved_buffers()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00618">UnpinBlock()</a>, <a class="el" href="buffered-block-mgr_8cc_source.html#l00995">Validate()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00643">WriteUnpinnedBlocks()</a>.</p>
</div>
</div>
<a class="anchor" id="a943168d8980260c3dd562a36a3b483b1"></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_1InternalQueue.html">InternalQueue</a>&lt;<a class="el" href="classimpala_1_1BufferedBlockMgr_1_1Block.html">Block</a>&gt; impala::BufferedBlockMgr::unused_blocks_</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>List of blocks that have been deleted and are no longer in use. Can be reused in <a class="el" href="classimpala_1_1BufferedBlockMgr.html#ac4ddea92960294d8f764c2974fe273f9">GetNewBlock()</a>. Blocks in this list must be in the Init'ed state, i.e. buffer_desc_ = NULL, is_pinned_ = false, in_write_ = false, is_deleted_ = false, valid_data_len = 0. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00546">546</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#l00979">GetUnusedBlock()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00828">ReturnUnusedBlock()</a>.</p>
</div>
</div>
<a class="anchor" id="a7f5db3ecfabd31a7111d13385e971979"></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::writes_issued_</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 writes issued. </p>
<p>Definition at line <a class="el" href="buffered-block-mgr_8h_source.html#l00610">610</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#l00389">writes_issued()</a>, and <a class="el" href="buffered-block-mgr_8cc_source.html#l00659">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="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>