blob: a8e886776804517fe92a0072c5820853b9e696bd [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.12) on Mon Nov 08 18:33:49 PST 2021 -->
<title>HiveTableOperations</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2021-11-08">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="HiveTableOperations";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.iceberg.hive</a></div>
<h2 title="Class HiveTableOperations" class="title">Class HiveTableOperations</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../BaseMetastoreTableOperations.html" title="class in org.apache.iceberg">org.apache.iceberg.BaseMetastoreTableOperations</a></li>
<li>
<ul class="inheritance">
<li>org.apache.iceberg.hive.HiveTableOperations</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="../TableOperations.html" title="interface in org.apache.iceberg">TableOperations</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">HiveTableOperations</span>
extends <a href="../BaseMetastoreTableOperations.html" title="class in org.apache.iceberg">BaseMetastoreTableOperations</a></pre>
<div class="block">TODO we should be able to extract some more commonalities to BaseMetastoreTableOperations to
avoid code duplication between this class and Metacat Tables.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.org.apache.iceberg.BaseMetastoreTableOperations">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;org.apache.iceberg.<a href="../BaseMetastoreTableOperations.html" title="class in org.apache.iceberg">BaseMetastoreTableOperations</a></h3>
<code><a href="../BaseMetastoreTableOperations.CommitStatus.html" title="enum in org.apache.iceberg">BaseMetastoreTableOperations.CommitStatus</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.iceberg.BaseMetastoreTableOperations">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.iceberg.<a href="../BaseMetastoreTableOperations.html" title="class in org.apache.iceberg">BaseMetastoreTableOperations</a></h3>
<code><a href="../BaseMetastoreTableOperations.html#ICEBERG_TABLE_TYPE_VALUE">ICEBERG_TABLE_TYPE_VALUE</a>, <a href="../BaseMetastoreTableOperations.html#METADATA_LOCATION_PROP">METADATA_LOCATION_PROP</a>, <a href="../BaseMetastoreTableOperations.html#PREVIOUS_METADATA_LOCATION_PROP">PREVIOUS_METADATA_LOCATION_PROP</a>, <a href="../BaseMetastoreTableOperations.html#TABLE_TYPE_PROP">TABLE_TYPE_PROP</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colSecond" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.hadoop.conf.Configuration,org.apache.iceberg.ClientPool,org.apache.iceberg.io.FileIO,java.lang.String,java.lang.String,java.lang.String)">HiveTableOperations</a></span>&#8203;(org.apache.hadoop.conf.Configuration&nbsp;conf,
<a href="../ClientPool.html" title="interface in org.apache.iceberg">ClientPool</a>&nbsp;metaClients,
<a href="../io/FileIO.html" title="interface in org.apache.iceberg.io">FileIO</a>&nbsp;fileIO,
java.lang.String&nbsp;catalogName,
java.lang.String&nbsp;database,
java.lang.String&nbsp;table)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doCommit(org.apache.iceberg.TableMetadata,org.apache.iceberg.TableMetadata)">doCommit</a></span>&#8203;(<a href="../TableMetadata.html" title="class in org.apache.iceberg">TableMetadata</a>&nbsp;base,
<a href="../TableMetadata.html" title="class in org.apache.iceberg">TableMetadata</a>&nbsp;metadata)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doRefresh()">doRefresh</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../io/FileIO.html" title="interface in org.apache.iceberg.io">FileIO</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#io()">io</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a <a href="../io/FileIO.html" title="interface in org.apache.iceberg.io"><code>FileIO</code></a> to read and write table data and metadata files.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tableName()">tableName</a></span>()</code></th>
<td class="colLast">
<div class="block">The full name of the table used for logging purposes only.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#translateToIcebergProp(java.lang.String)">translateToIcebergProp</a></span>&#8203;(java.lang.String&nbsp;hmsProp)</code></th>
<td class="colLast">
<div class="block">Provides key translation where necessary between Iceberg and HMS props.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.iceberg.BaseMetastoreTableOperations">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.iceberg.<a href="../BaseMetastoreTableOperations.html" title="class in org.apache.iceberg">BaseMetastoreTableOperations</a></h3>
<code><a href="../BaseMetastoreTableOperations.html#checkCommitStatus(java.lang.String,org.apache.iceberg.TableMetadata)">checkCommitStatus</a>, <a href="../BaseMetastoreTableOperations.html#commit(org.apache.iceberg.TableMetadata,org.apache.iceberg.TableMetadata)">commit</a>, <a href="../BaseMetastoreTableOperations.html#current()">current</a>, <a href="../BaseMetastoreTableOperations.html#currentMetadataLocation()">currentMetadataLocation</a>, <a href="../BaseMetastoreTableOperations.html#currentVersion()">currentVersion</a>, <a href="../BaseMetastoreTableOperations.html#disableRefresh()">disableRefresh</a>, <a href="../BaseMetastoreTableOperations.html#locationProvider()">locationProvider</a>, <a href="../BaseMetastoreTableOperations.html#metadataFileLocation(java.lang.String)">metadataFileLocation</a>, <a href="../BaseMetastoreTableOperations.html#refresh()">refresh</a>, <a href="../BaseMetastoreTableOperations.html#refreshFromMetadataLocation(java.lang.String)">refreshFromMetadataLocation</a>, <a href="../BaseMetastoreTableOperations.html#refreshFromMetadataLocation(java.lang.String,int)">refreshFromMetadataLocation</a>, <a href="../BaseMetastoreTableOperations.html#refreshFromMetadataLocation(java.lang.String,java.util.function.Predicate,int)">refreshFromMetadataLocation</a>, <a href="../BaseMetastoreTableOperations.html#requestRefresh()">requestRefresh</a>, <a href="../BaseMetastoreTableOperations.html#temp(org.apache.iceberg.TableMetadata)">temp</a>, <a href="../BaseMetastoreTableOperations.html#writeNewMetadata(org.apache.iceberg.TableMetadata,int)">writeNewMetadata</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.iceberg.TableOperations">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.iceberg.<a href="../TableOperations.html" title="interface in org.apache.iceberg">TableOperations</a></h3>
<code><a href="../TableOperations.html#encryption()">encryption</a>, <a href="../TableOperations.html#newSnapshotId()">newSnapshotId</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(org.apache.hadoop.conf.Configuration,org.apache.iceberg.ClientPool,org.apache.iceberg.io.FileIO,java.lang.String,java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>HiveTableOperations</h4>
<pre>protected&nbsp;HiveTableOperations&#8203;(org.apache.hadoop.conf.Configuration&nbsp;conf,
<a href="../ClientPool.html" title="interface in org.apache.iceberg">ClientPool</a>&nbsp;metaClients,
<a href="../io/FileIO.html" title="interface in org.apache.iceberg.io">FileIO</a>&nbsp;fileIO,
java.lang.String&nbsp;catalogName,
java.lang.String&nbsp;database,
java.lang.String&nbsp;table)</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="translateToIcebergProp(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>translateToIcebergProp</h4>
<pre class="methodSignature">public static&nbsp;java.lang.String&nbsp;translateToIcebergProp&#8203;(java.lang.String&nbsp;hmsProp)</pre>
<div class="block">Provides key translation where necessary between Iceberg and HMS props. This translation is needed because some
properties control the same behaviour but are named differently in Iceberg and Hive. Therefore changes to these
property pairs should be synchronized.
Example: Deleting data files upon DROP TABLE is enabled using gc.enabled=true in Iceberg and
external.table.purge=true in Hive. Hive and Iceberg users are unaware of each other's control flags, therefore
inconsistent behaviour can occur from e.g. a Hive user's point of view if external.table.purge=true is set on the
HMS table but gc.enabled=false is set on the Iceberg table, resulting in no data file deletion.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>hmsProp</code> - The HMS property that should be translated to Iceberg property</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Iceberg property equivalent to the hmsProp. If no such translation exists, the original hmsProp is returned</dd>
</dl>
</li>
</ul>
<a id="tableName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tableName</h4>
<pre class="methodSignature">protected&nbsp;java.lang.String&nbsp;tableName()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../BaseMetastoreTableOperations.html#tableName()">BaseMetastoreTableOperations</a></code></span></div>
<div class="block">The full name of the table used for logging purposes only. For example for HiveTableOperations it is
catalogName + "." + database + "." + table.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../BaseMetastoreTableOperations.html#tableName()">tableName</a></code>&nbsp;in class&nbsp;<code><a href="../BaseMetastoreTableOperations.html" title="class in org.apache.iceberg">BaseMetastoreTableOperations</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The full name</dd>
</dl>
</li>
</ul>
<a id="io()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>io</h4>
<pre class="methodSignature">public&nbsp;<a href="../io/FileIO.html" title="interface in org.apache.iceberg.io">FileIO</a>&nbsp;io()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../TableOperations.html#io()">TableOperations</a></code></span></div>
<div class="block">Returns a <a href="../io/FileIO.html" title="interface in org.apache.iceberg.io"><code>FileIO</code></a> to read and write table data and metadata files.</div>
</li>
</ul>
<a id="doRefresh()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doRefresh</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;doRefresh()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../BaseMetastoreTableOperations.html#doRefresh()">doRefresh</a></code>&nbsp;in class&nbsp;<code><a href="../BaseMetastoreTableOperations.html" title="class in org.apache.iceberg">BaseMetastoreTableOperations</a></code></dd>
</dl>
</li>
</ul>
<a id="doCommit(org.apache.iceberg.TableMetadata,org.apache.iceberg.TableMetadata)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>doCommit</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;doCommit&#8203;(<a href="../TableMetadata.html" title="class in org.apache.iceberg">TableMetadata</a>&nbsp;base,
<a href="../TableMetadata.html" title="class in org.apache.iceberg">TableMetadata</a>&nbsp;metadata)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../BaseMetastoreTableOperations.html#doCommit(org.apache.iceberg.TableMetadata,org.apache.iceberg.TableMetadata)">doCommit</a></code>&nbsp;in class&nbsp;<code><a href="../BaseMetastoreTableOperations.html" title="class in org.apache.iceberg">BaseMetastoreTableOperations</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>