blob: ef1d4c32e0f4eb40ed38141b684321e51f5dd1b3 [file]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Paimon-cpp: /home/runner/work/paimon-cpp/paimon-cpp/include/paimon/reader/prefetch_file_batch_reader.h Source File</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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></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 id="projectrow">
<td id="projectalign">
<div id="projectname">Paimon-cpp
</div>
<div id="projectbrief">A high-performance C++ implementation of Apache Paimon</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d5ce83a91c1ada980bd794a9f3314520.html">paimon</a></li><li class="navelem"><a class="el" href="dir_9c552d3700583f259251ef2f8e23912b.html">reader</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">prefetch_file_batch_reader.h</div></div>
</div><!--header-->
<div class="contents">
<a href="prefetch__file__batch__reader_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment"> * or more contributor license agreements. See the NOTICE file</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> * distributed with this work for additional information</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"> * regarding copyright ownership. The ASF licenses this file</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment"> * to you under the Apache License, Version 2.0 (the</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"> * &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"> *</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment"> *</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment"> * Unless required by applicable law or agreed to in writing,</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment"> * software distributed under the License is distributed on an</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment"> * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment"> * KIND, either express or implied. See the License for the</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment"> * specific language governing permissions and limitations</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment"> * under the License.</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment"> */</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include &lt;utility&gt;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor">#include &quot;<a class="code" href="file__batch__reader_8h.html">paimon/reader/file_batch_reader.h</a>&quot;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacepaimon.html">paimon</a> {</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="foldopen" id="foldopen00033" data-start="{" data-end="};">
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="classpaimon_1_1_prefetch_file_batch_reader.html"> 33</a></span><span class="keyword">class </span><a class="code hl_define" href="memory__pool_8h.html#a147ba4ba34a215b3a4f3a95c1ee11704">PAIMON_EXPORT</a> <a class="code hl_class" href="classpaimon_1_1_prefetch_file_batch_reader.html">PrefetchFileBatchReader</a> : <span class="keyword">public</span> <a class="code hl_class" href="classpaimon_1_1_file_batch_reader.html">FileBatchReader</a> {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="classpaimon_1_1_prefetch_file_batch_reader.html#a66a9334bd1dfe45e20040116ca4c53e2"> 38</a></span> <span class="keyword">virtual</span> <a class="code hl_class" href="classpaimon_1_1_status.html">Status</a> <a class="code hl_function" href="classpaimon_1_1_prefetch_file_batch_reader.html#a66a9334bd1dfe45e20040116ca4c53e2">SeekToRow</a>(<a class="code hl_define" href="memory__pool_8h.html#a147ba4ba34a215b3a4f3a95c1ee11704">uint64_t</a> <a class="code hl_define" href="memory__pool_8h.html#a147ba4ba34a215b3a4f3a95c1ee11704">row_number</a>) = 0;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="classpaimon_1_1_prefetch_file_batch_reader.html#a8167dd4af27a9a4ae20581cf2dccfadd"> 43</a></span> <span class="keyword">virtual</span> <a class="code hl_define" href="memory__pool_8h.html#a147ba4ba34a215b3a4f3a95c1ee11704">uint64_t</a> <a class="code hl_function" href="classpaimon_1_1_prefetch_file_batch_reader.html#a8167dd4af27a9a4ae20581cf2dccfadd">GetNextRowToRead</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="classpaimon_1_1_prefetch_file_batch_reader.html#a69e71fd2021a1da2fe53c89a72e06596"> 66</a></span> <span class="keyword">virtual</span> <a class="code hl_class" href="classpaimon_1_1_result.html">Result&lt;std::vector&lt;std::pair&lt;uint64_t, uint64_t&gt;</a>&gt;&gt; <a class="code hl_function" href="classpaimon_1_1_prefetch_file_batch_reader.html#a69e71fd2021a1da2fe53c89a72e06596">GenReadRanges</a>(</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordtype">bool</span>* <a class="code hl_define" href="memory__pool_8h.html#a147ba4ba34a215b3a4f3a95c1ee11704">need_prefetch</a>) <span class="keyword">const</span> = 0;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="classpaimon_1_1_prefetch_file_batch_reader.html#ac3352521fbeb92b417f685ee8230bca6"> 76</a></span> <span class="keyword">virtual</span> <a class="code hl_class" href="classpaimon_1_1_status.html">Status</a> <a class="code hl_function" href="classpaimon_1_1_prefetch_file_batch_reader.html#ac3352521fbeb92b417f685ee8230bca6">SetReadRanges</a>(<span class="keyword">const</span> std::vector&lt;std::pair&lt;uint64_t, uint64_t&gt;&gt;&amp; <a class="code hl_define" href="memory__pool_8h.html#a147ba4ba34a215b3a4f3a95c1ee11704">read_ranges</a>) = 0;</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
<div class="foldopen" id="foldopen00094" data-start="{" data-end="}">
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="classpaimon_1_1_prefetch_file_batch_reader.html#af0e9acc0b5cd69f720e47a74287c7b71"> 94</a></span> <span class="keyword">virtual</span> <a class="code hl_class" href="classpaimon_1_1_result.html">Result&lt;std::vector&lt;std::pair&lt;uint64_t, uint64_t&gt;</a>&gt;&gt; <a class="code hl_function" href="classpaimon_1_1_prefetch_file_batch_reader.html#af0e9acc0b5cd69f720e47a74287c7b71">PreBufferRange</a>() {</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">return</span> std::vector&lt;std::pair&lt;uint64_t, uint64_t&gt;&gt;{};</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> }</div>
</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span>};</div>
</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span>} <span class="comment">// namespace paimon</span></div>
<div class="ttc" id="aclasspaimon_1_1_file_batch_reader_html"><div class="ttname"><a href="classpaimon_1_1_file_batch_reader.html">paimon::FileBatchReader</a></div><div class="ttdoc">The batch reader for a single file supports returning the line number of the last batch read for dele...</div><div class="ttdef"><b>Definition</b> file_batch_reader.h:32</div></div>
<div class="ttc" id="aclasspaimon_1_1_prefetch_file_batch_reader_html"><div class="ttname"><a href="classpaimon_1_1_prefetch_file_batch_reader.html">paimon::PrefetchFileBatchReader</a></div><div class="ttdoc">The prefetch file batch reader extends the basic FileBatchReader interface for prefetch read,...</div><div class="ttdef"><b>Definition</b> prefetch_file_batch_reader.h:33</div></div>
<div class="ttc" id="aclasspaimon_1_1_prefetch_file_batch_reader_html_a66a9334bd1dfe45e20040116ca4c53e2"><div class="ttname"><a href="classpaimon_1_1_prefetch_file_batch_reader.html#a66a9334bd1dfe45e20040116ca4c53e2">paimon::PrefetchFileBatchReader::SeekToRow</a></div><div class="ttdeci">virtual Status SeekToRow(uint64_t row_number)=0</div><div class="ttdoc">Seeks to a specific row in the file.</div></div>
<div class="ttc" id="aclasspaimon_1_1_prefetch_file_batch_reader_html_a69e71fd2021a1da2fe53c89a72e06596"><div class="ttname"><a href="classpaimon_1_1_prefetch_file_batch_reader.html#a69e71fd2021a1da2fe53c89a72e06596">paimon::PrefetchFileBatchReader::GenReadRanges</a></div><div class="ttdeci">virtual Result&lt; std::vector&lt; std::pair&lt; uint64_t, uint64_t &gt; &gt; &gt; GenReadRanges(bool *need_prefetch) const =0</div><div class="ttdoc">Generates a list of row ranges to be read in batches.</div></div>
<div class="ttc" id="aclasspaimon_1_1_prefetch_file_batch_reader_html_a8167dd4af27a9a4ae20581cf2dccfadd"><div class="ttname"><a href="classpaimon_1_1_prefetch_file_batch_reader.html#a8167dd4af27a9a4ae20581cf2dccfadd">paimon::PrefetchFileBatchReader::GetNextRowToRead</a></div><div class="ttdeci">virtual uint64_t GetNextRowToRead() const =0</div><div class="ttdoc">Retrieves the row number of the next row to be read.</div></div>
<div class="ttc" id="aclasspaimon_1_1_prefetch_file_batch_reader_html_ac3352521fbeb92b417f685ee8230bca6"><div class="ttname"><a href="classpaimon_1_1_prefetch_file_batch_reader.html#ac3352521fbeb92b417f685ee8230bca6">paimon::PrefetchFileBatchReader::SetReadRanges</a></div><div class="ttdeci">virtual Status SetReadRanges(const std::vector&lt; std::pair&lt; uint64_t, uint64_t &gt; &gt; &amp;read_ranges)=0</div><div class="ttdoc">Sets the specific row ranges as a hint to be read from format file.</div></div>
<div class="ttc" id="aclasspaimon_1_1_prefetch_file_batch_reader_html_af0e9acc0b5cd69f720e47a74287c7b71"><div class="ttname"><a href="classpaimon_1_1_prefetch_file_batch_reader.html#af0e9acc0b5cd69f720e47a74287c7b71">paimon::PrefetchFileBatchReader::PreBufferRange</a></div><div class="ttdeci">virtual Result&lt; std::vector&lt; std::pair&lt; uint64_t, uint64_t &gt; &gt; &gt; PreBufferRange()</div><div class="ttdoc">Returns a list of file offset/length ranges that should be prefetched for the current read scenario.</div><div class="ttdef"><b>Definition</b> prefetch_file_batch_reader.h:94</div></div>
<div class="ttc" id="aclasspaimon_1_1_result_html"><div class="ttname"><a href="classpaimon_1_1_result.html">paimon::Result</a></div><div class="ttdoc">A Result&lt;T&gt; object holds either a value of type T or a Status object explaining why such a value is n...</div><div class="ttdef"><b>Definition</b> result.h:33</div></div>
<div class="ttc" id="aclasspaimon_1_1_status_html"><div class="ttname"><a href="classpaimon_1_1_status.html">paimon::Status</a></div><div class="ttdoc">Status outcome object (success or error)</div><div class="ttdef"><b>Definition</b> status.h:92</div></div>
<div class="ttc" id="afile__batch__reader_8h_html"><div class="ttname"><a href="file__batch__reader_8h.html">file_batch_reader.h</a></div></div>
<div class="ttc" id="amemory__pool_8h_html_a147ba4ba34a215b3a4f3a95c1ee11704"><div class="ttname"><a href="memory__pool_8h.html#a147ba4ba34a215b3a4f3a95c1ee11704">PAIMON_UNIQUE_PTR</a></div><div class="ttdeci">#define PAIMON_UNIQUE_PTR</div><div class="ttdef"><b>Definition</b> memory_pool.h:219</div></div>
<div class="ttc" id="anamespacepaimon_html"><div class="ttname"><a href="namespacepaimon.html">paimon</a></div><div class="ttdoc">Top-level namespace for Paimon C++ API.</div><div class="ttdef"><b>Definition</b> api.h:42</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>