blob: b844aa96a1624762fb7ed79beee0589d103cf293 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_201) on Mon Nov 16 15:41:48 PST 2020 -->
<title>ExpireSnapshotsAction</title>
<meta name="date" content="2020-11-16">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ExpireSnapshotsAction";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.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">
<li><a href="../../../../org/apache/iceberg/actions/BaseRewriteDataFilesAction.html" title="class in org.apache.iceberg.actions"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsActionResult.html" title="class in org.apache.iceberg.actions"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/iceberg/actions/ExpireSnapshotsAction.html" target="_top">Frames</a></li>
<li><a href="ExpireSnapshotsAction.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></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>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.iceberg.actions</div>
<h2 title="Class ExpireSnapshotsAction" class="title">Class ExpireSnapshotsAction</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.iceberg.actions.ExpireSnapshotsAction</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../org/apache/iceberg/actions/Action.html" title="interface in org.apache.iceberg.actions">Action</a>&lt;<a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsActionResult.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsActionResult</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">ExpireSnapshotsAction</span>
extends java.lang.Object</pre>
<div class="block">An action which performs the same operation as <a href="../../../../org/apache/iceberg/ExpireSnapshots.html" title="interface in org.apache.iceberg"><code>ExpireSnapshots</code></a> but uses Spark
to determine the delta in files between the pre and post-expiration table metadata. All of the same
restrictions of Remove Snapshots also apply to this action.
<p>
This implementation uses the metadata tables for the table being expired to list all Manifest and DataFiles. This
is made into a Dataframe which are anti-joined with the same list read after the expiration. This operation will
require a shuffle so parallelism can be controlled through spark.sql.shuffle.partitions. The expiration is done
locally using a direct call to RemoveSnapshots. The snapshot expiration will be fully committed before any deletes
are issued. Deletes are still performed locally after retrieving the results from the Spark executors.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</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="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#buildManifestFileDF-org.apache.spark.sql.SparkSession-java.lang.String-">buildManifestFileDF</a></span>(org.apache.spark.sql.SparkSession&nbsp;spark,
java.lang.String&nbsp;tableName)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#buildManifestListDF-org.apache.spark.sql.SparkSession-java.lang.String-">buildManifestListDF</a></span>(org.apache.spark.sql.SparkSession&nbsp;spark,
java.lang.String&nbsp;metadataFileLocation)</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#buildManifestListDF-org.apache.spark.sql.SparkSession-org.apache.iceberg.Table-">buildManifestListDF</a></span>(org.apache.spark.sql.SparkSession&nbsp;spark,
<a href="../../../../org/apache/iceberg/Table.html" title="interface in org.apache.iceberg">Table</a>&nbsp;table)</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#buildOtherMetadataFileDF-org.apache.spark.sql.SparkSession-org.apache.iceberg.TableOperations-">buildOtherMetadataFileDF</a></span>(org.apache.spark.sql.SparkSession&nbsp;spark,
<a href="../../../../org/apache/iceberg/TableOperations.html" title="interface in org.apache.iceberg">TableOperations</a>&nbsp;ops)</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#buildValidDataFileDF-org.apache.spark.sql.SparkSession-">buildValidDataFileDF</a></span>(org.apache.spark.sql.SparkSession&nbsp;spark)</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#buildValidDataFileDF-org.apache.spark.sql.SparkSession-java.lang.String-">buildValidDataFileDF</a></span>(org.apache.spark.sql.SparkSession&nbsp;spark,
java.lang.String&nbsp;tableName)</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#buildValidMetadataFileDF-org.apache.spark.sql.SparkSession-org.apache.iceberg.Table-org.apache.iceberg.TableOperations-">buildValidMetadataFileDF</a></span>(org.apache.spark.sql.SparkSession&nbsp;spark,
<a href="../../../../org/apache/iceberg/Table.html" title="interface in org.apache.iceberg">Table</a>&nbsp;table,
<a href="../../../../org/apache/iceberg/TableOperations.html" title="interface in org.apache.iceberg">TableOperations</a>&nbsp;ops)</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsAction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#deleteWith-java.util.function.Consumer-">deleteWith</a></span>(java.util.function.Consumer&lt;java.lang.String&gt;&nbsp;newDeleteFunc)</code>
<div class="block">The Consumer used on files which have been determined to be expired.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsActionResult.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsActionResult</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#execute--">execute</a></span>()</code>
<div class="block">Executes this action.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsAction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#executeDeleteWith-java.util.concurrent.ExecutorService-">executeDeleteWith</a></span>(java.util.concurrent.ExecutorService&nbsp;executorService)</code>
<div class="block">An executor service used when deleting files.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#expire--">expire</a></span>()</code>
<div class="block">Expires snapshots and commits the changes to the table, returning a Dataset of files to delete.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsAction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#expireOlderThan-long-">expireOlderThan</a></span>(long&nbsp;timestampMillis)</code>
<div class="block">Expire all snapshots older than a given timestamp.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsAction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#expireSnapshotId-long-">expireSnapshotId</a></span>(long&nbsp;expireSnapshotId)</code>
<div class="block">A specific snapshot to expire.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>protected java.util.List&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#getManifestListPaths-java.lang.Iterable-">getManifestListPaths</a></span>(java.lang.Iterable&lt;<a href="../../../../org/apache/iceberg/Snapshot.html" title="interface in org.apache.iceberg">Snapshot</a>&gt;&nbsp;snapshots)</code>
<div class="block">Returns all the path locations of all Manifest Lists for a given list of snapshots</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>protected java.util.List&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#getOtherMetadataFilePaths-org.apache.iceberg.TableOperations-">getOtherMetadataFilePaths</a></span>(<a href="../../../../org/apache/iceberg/TableOperations.html" title="interface in org.apache.iceberg">TableOperations</a>&nbsp;ops)</code>
<div class="block">Returns all Metadata file paths which may not be in the current metadata.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>protected java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#metadataTableName-org.apache.iceberg.MetadataTableType-">metadataTableName</a></span>(<a href="../../../../org/apache/iceberg/MetadataTableType.html" title="enum in org.apache.iceberg">MetadataTableType</a>&nbsp;type)</code>&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>protected java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#metadataTableName-java.lang.String-org.apache.iceberg.MetadataTableType-">metadataTableName</a></span>(java.lang.String&nbsp;tableName,
<a href="../../../../org/apache/iceberg/MetadataTableType.html" title="enum in org.apache.iceberg">MetadataTableType</a>&nbsp;type)</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsAction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#retainLast-int-">retainLast</a></span>(int&nbsp;numSnapshots)</code>
<div class="block">Retain at least x snapshots when expiring
Identical to <a href="../../../../org/apache/iceberg/ExpireSnapshots.html#retainLast-int-"><code>ExpireSnapshots.retainLast(int)</code></a></div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsAction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#streamDeleteResults-boolean-">streamDeleteResults</a></span>(boolean&nbsp;stream)</code>
<div class="block">By default, all files to delete are brought to the driver at once which may be an issue with very long file lists.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/iceberg/Table.html" title="interface in org.apache.iceberg">Table</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#table--">table</a></span>()</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="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>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="table--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>table</h4>
<pre>protected&nbsp;<a href="../../../../org/apache/iceberg/Table.html" title="interface in org.apache.iceberg">Table</a>&nbsp;table()</pre>
</li>
</ul>
<a name="streamDeleteResults-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>streamDeleteResults</h4>
<pre>public&nbsp;<a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsAction</a>&nbsp;streamDeleteResults(boolean&nbsp;stream)</pre>
<div class="block">By default, all files to delete are brought to the driver at once which may be an issue with very long file lists.
Set this to true to use toLocalIterator if you are running into memory issues when collecting
the list of files to be deleted.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>stream</code> - whether to use toLocalIterator to stream results instead of collect.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this for method chaining</dd>
</dl>
</li>
</ul>
<a name="executeDeleteWith-java.util.concurrent.ExecutorService-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>executeDeleteWith</h4>
<pre>public&nbsp;<a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsAction</a>&nbsp;executeDeleteWith(java.util.concurrent.ExecutorService&nbsp;executorService)</pre>
<div class="block">An executor service used when deleting files. Only used during the local delete phase of this Spark action.
Similar to <a href="../../../../org/apache/iceberg/ExpireSnapshots.html#executeDeleteWith-java.util.concurrent.ExecutorService-"><code>ExpireSnapshots.executeDeleteWith(ExecutorService)</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>executorService</code> - the service to use</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this for method chaining</dd>
</dl>
</li>
</ul>
<a name="expireSnapshotId-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>expireSnapshotId</h4>
<pre>public&nbsp;<a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsAction</a>&nbsp;expireSnapshotId(long&nbsp;expireSnapshotId)</pre>
<div class="block">A specific snapshot to expire.
Identical to <a href="../../../../org/apache/iceberg/ExpireSnapshots.html#expireSnapshotId-long-"><code>ExpireSnapshots.expireSnapshotId(long)</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>expireSnapshotId</code> - Id of the snapshot to expire</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this for method chaining</dd>
</dl>
</li>
</ul>
<a name="expireOlderThan-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>expireOlderThan</h4>
<pre>public&nbsp;<a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsAction</a>&nbsp;expireOlderThan(long&nbsp;timestampMillis)</pre>
<div class="block">Expire all snapshots older than a given timestamp.
Identical to <a href="../../../../org/apache/iceberg/ExpireSnapshots.html#expireOlderThan-long-"><code>ExpireSnapshots.expireOlderThan(long)</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>timestampMillis</code> - all snapshots before this time will be expired</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this for method chaining</dd>
</dl>
</li>
</ul>
<a name="retainLast-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>retainLast</h4>
<pre>public&nbsp;<a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsAction</a>&nbsp;retainLast(int&nbsp;numSnapshots)</pre>
<div class="block">Retain at least x snapshots when expiring
Identical to <a href="../../../../org/apache/iceberg/ExpireSnapshots.html#retainLast-int-"><code>ExpireSnapshots.retainLast(int)</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>numSnapshots</code> - number of snapshots to leave</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this for method chaining</dd>
</dl>
</li>
</ul>
<a name="deleteWith-java.util.function.Consumer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deleteWith</h4>
<pre>public&nbsp;<a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsAction</a>&nbsp;deleteWith(java.util.function.Consumer&lt;java.lang.String&gt;&nbsp;newDeleteFunc)</pre>
<div class="block">The Consumer used on files which have been determined to be expired. By default uses a filesystem delete.
Identical to <a href="../../../../org/apache/iceberg/ExpireSnapshots.html#deleteWith-java.util.function.Consumer-"><code>ExpireSnapshots.deleteWith(Consumer)</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>newDeleteFunc</code> - Consumer which takes a path and deletes it</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this for method chaining</dd>
</dl>
</li>
</ul>
<a name="expire--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>expire</h4>
<pre>public&nbsp;org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;&nbsp;expire()</pre>
<div class="block">Expires snapshots and commits the changes to the table, returning a Dataset of files to delete.
<p>
This does not delete data files. To delete data files, run <a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#execute--"><code>execute()</code></a>.
<p>
This may be called before or after <a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsAction.html#execute--"><code>execute()</code></a> is called to return the expired file list.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a Dataset of files that are no longer referenced by the table</dd>
</dl>
</li>
</ul>
<a name="execute--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>execute</h4>
<pre>public&nbsp;<a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsActionResult.html" title="class in org.apache.iceberg.actions">ExpireSnapshotsActionResult</a>&nbsp;execute()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/iceberg/actions/Action.html#execute--">Action</a></code></span></div>
<div class="block">Executes this action.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the result of this action</dd>
</dl>
</li>
</ul>
<a name="buildValidDataFileDF-org.apache.spark.sql.SparkSession-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildValidDataFileDF</h4>
<pre>protected&nbsp;org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;&nbsp;buildValidDataFileDF(org.apache.spark.sql.SparkSession&nbsp;spark)</pre>
</li>
</ul>
<a name="buildValidDataFileDF-org.apache.spark.sql.SparkSession-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildValidDataFileDF</h4>
<pre>protected&nbsp;org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;&nbsp;buildValidDataFileDF(org.apache.spark.sql.SparkSession&nbsp;spark,
java.lang.String&nbsp;tableName)</pre>
</li>
</ul>
<a name="buildManifestFileDF-org.apache.spark.sql.SparkSession-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildManifestFileDF</h4>
<pre>protected&nbsp;org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;&nbsp;buildManifestFileDF(org.apache.spark.sql.SparkSession&nbsp;spark,
java.lang.String&nbsp;tableName)</pre>
</li>
</ul>
<a name="buildManifestListDF-org.apache.spark.sql.SparkSession-org.apache.iceberg.Table-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildManifestListDF</h4>
<pre>protected&nbsp;org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;&nbsp;buildManifestListDF(org.apache.spark.sql.SparkSession&nbsp;spark,
<a href="../../../../org/apache/iceberg/Table.html" title="interface in org.apache.iceberg">Table</a>&nbsp;table)</pre>
</li>
</ul>
<a name="buildManifestListDF-org.apache.spark.sql.SparkSession-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildManifestListDF</h4>
<pre>protected&nbsp;org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;&nbsp;buildManifestListDF(org.apache.spark.sql.SparkSession&nbsp;spark,
java.lang.String&nbsp;metadataFileLocation)</pre>
</li>
</ul>
<a name="buildOtherMetadataFileDF-org.apache.spark.sql.SparkSession-org.apache.iceberg.TableOperations-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildOtherMetadataFileDF</h4>
<pre>protected&nbsp;org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;&nbsp;buildOtherMetadataFileDF(org.apache.spark.sql.SparkSession&nbsp;spark,
<a href="../../../../org/apache/iceberg/TableOperations.html" title="interface in org.apache.iceberg">TableOperations</a>&nbsp;ops)</pre>
</li>
</ul>
<a name="buildValidMetadataFileDF-org.apache.spark.sql.SparkSession-org.apache.iceberg.Table-org.apache.iceberg.TableOperations-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildValidMetadataFileDF</h4>
<pre>protected&nbsp;org.apache.spark.sql.Dataset&lt;org.apache.spark.sql.Row&gt;&nbsp;buildValidMetadataFileDF(org.apache.spark.sql.SparkSession&nbsp;spark,
<a href="../../../../org/apache/iceberg/Table.html" title="interface in org.apache.iceberg">Table</a>&nbsp;table,
<a href="../../../../org/apache/iceberg/TableOperations.html" title="interface in org.apache.iceberg">TableOperations</a>&nbsp;ops)</pre>
</li>
</ul>
<a name="metadataTableName-org.apache.iceberg.MetadataTableType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>metadataTableName</h4>
<pre>protected&nbsp;java.lang.String&nbsp;metadataTableName(<a href="../../../../org/apache/iceberg/MetadataTableType.html" title="enum in org.apache.iceberg">MetadataTableType</a>&nbsp;type)</pre>
</li>
</ul>
<a name="metadataTableName-java.lang.String-org.apache.iceberg.MetadataTableType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>metadataTableName</h4>
<pre>protected&nbsp;java.lang.String&nbsp;metadataTableName(java.lang.String&nbsp;tableName,
<a href="../../../../org/apache/iceberg/MetadataTableType.html" title="enum in org.apache.iceberg">MetadataTableType</a>&nbsp;type)</pre>
</li>
</ul>
<a name="getManifestListPaths-java.lang.Iterable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getManifestListPaths</h4>
<pre>protected&nbsp;java.util.List&lt;java.lang.String&gt;&nbsp;getManifestListPaths(java.lang.Iterable&lt;<a href="../../../../org/apache/iceberg/Snapshot.html" title="interface in org.apache.iceberg">Snapshot</a>&gt;&nbsp;snapshots)</pre>
<div class="block">Returns all the path locations of all Manifest Lists for a given list of snapshots</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>snapshots</code> - snapshots</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the paths of the Manifest Lists</dd>
</dl>
</li>
</ul>
<a name="getOtherMetadataFilePaths-org.apache.iceberg.TableOperations-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getOtherMetadataFilePaths</h4>
<pre>protected&nbsp;java.util.List&lt;java.lang.String&gt;&nbsp;getOtherMetadataFilePaths(<a href="../../../../org/apache/iceberg/TableOperations.html" title="interface in org.apache.iceberg">TableOperations</a>&nbsp;ops)</pre>
<div class="block">Returns all Metadata file paths which may not be in the current metadata. Specifically this includes "version-hint"
files as well as entries in metadata.previousFiles.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ops</code> - TableOperations for the table we will be getting paths from</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a list of paths to metadata files</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.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">
<li><a href="../../../../org/apache/iceberg/actions/BaseRewriteDataFilesAction.html" title="class in org.apache.iceberg.actions"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/iceberg/actions/ExpireSnapshotsActionResult.html" title="class in org.apache.iceberg.actions"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/iceberg/actions/ExpireSnapshotsAction.html" target="_top">Frames</a></li>
<li><a href="ExpireSnapshotsAction.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.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>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>