Package org.apache.iceberg.spark.actions
Class SparkActions
- java.lang.Object
-
- org.apache.iceberg.spark.actions.SparkActions
-
- All Implemented Interfaces:
ActionsProvider
public class SparkActions extends java.lang.Object
An implementation ofActionsProvider
for Spark.This class is the primary API for interacting with actions in Spark that users should use to instantiate particular actions.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DeleteOrphanFiles
deleteOrphanFiles(Table table)
Instantiates an action to delete orphan files.DeleteReachableFiles
deleteReachableFiles(java.lang.String metadataLocation)
Instantiates an action to delete all the files reachable from given metadata location.ExpireSnapshots
expireSnapshots(Table table)
Instantiates an action to expire snapshots.static SparkActions
get()
static SparkActions
get(org.apache.spark.sql.SparkSession spark)
MigrateTable
migrateTable(java.lang.String tableIdent)
Instantiates an action to migrate an existing table to Iceberg.RewriteDataFiles
rewriteDataFiles(Table table)
Instantiates an action to rewrite data files.RewriteManifests
rewriteManifests(Table table)
Instantiates an action to rewrite manifests.SnapshotTable
snapshotTable(java.lang.String tableIdent)
Instantiates an action to snapshot an existing table as a new Iceberg table.protected org.apache.spark.sql.SparkSession
spark()
-
-
-
Method Detail
-
get
public static SparkActions get(org.apache.spark.sql.SparkSession spark)
-
get
public static SparkActions get()
-
snapshotTable
public SnapshotTable snapshotTable(java.lang.String tableIdent)
Description copied from interface:ActionsProvider
Instantiates an action to snapshot an existing table as a new Iceberg table.
-
migrateTable
public MigrateTable migrateTable(java.lang.String tableIdent)
Description copied from interface:ActionsProvider
Instantiates an action to migrate an existing table to Iceberg.
-
rewriteDataFiles
public RewriteDataFiles rewriteDataFiles(Table table)
Description copied from interface:ActionsProvider
Instantiates an action to rewrite data files.
-
spark
protected org.apache.spark.sql.SparkSession spark()
-
deleteOrphanFiles
public DeleteOrphanFiles deleteOrphanFiles(Table table)
Description copied from interface:ActionsProvider
Instantiates an action to delete orphan files.- Specified by:
deleteOrphanFiles
in interfaceActionsProvider
-
rewriteManifests
public RewriteManifests rewriteManifests(Table table)
Description copied from interface:ActionsProvider
Instantiates an action to rewrite manifests.- Specified by:
rewriteManifests
in interfaceActionsProvider
-
expireSnapshots
public ExpireSnapshots expireSnapshots(Table table)
Description copied from interface:ActionsProvider
Instantiates an action to expire snapshots.- Specified by:
expireSnapshots
in interfaceActionsProvider
-
deleteReachableFiles
public DeleteReachableFiles deleteReachableFiles(java.lang.String metadataLocation)
Description copied from interface:ActionsProvider
Instantiates an action to delete all the files reachable from given metadata location.- Specified by:
deleteReachableFiles
in interfaceActionsProvider
-
-