public class Spark3SnapshotAction extends java.lang.Object implements SnapshotAction
Modifier and Type | Field and Description |
---|---|
protected static java.util.List<java.lang.String> |
EXCLUDED_PROPERTIES |
protected static java.lang.String |
ICEBERG_METADATA_FOLDER |
protected static java.lang.String |
LOCATION |
Constructor and Description |
---|
Spark3SnapshotAction(org.apache.spark.sql.SparkSession spark,
org.apache.spark.sql.connector.catalog.CatalogPlugin sourceCatalog,
org.apache.spark.sql.connector.catalog.Identifier sourceTableIdent,
org.apache.spark.sql.connector.catalog.CatalogPlugin destCatalog,
org.apache.spark.sql.connector.catalog.Identifier destTableIdent) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
additionalProperties() |
protected org.apache.spark.sql.connector.catalog.TableCatalog |
checkSourceCatalog(org.apache.spark.sql.connector.catalog.CatalogPlugin catalog) |
protected org.apache.spark.sql.connector.catalog.StagingTableCatalog |
destCatalog() |
protected org.apache.spark.sql.connector.catalog.Identifier |
destTableIdent() |
protected void |
ensureNameMappingPresent(Table table) |
java.lang.Long |
execute()
Executes this action.
|
protected java.lang.String |
getMetadataLocation(Table table) |
protected org.apache.spark.sql.connector.catalog.TableCatalog |
sourceCatalog() |
protected org.apache.spark.sql.connector.catalog.Identifier |
sourceTableIdent() |
protected java.lang.String |
sourceTableLocation() |
protected org.apache.spark.sql.SparkSession |
spark() |
protected StagedSparkTable |
stageDestTable() |
protected java.util.Map<java.lang.String,java.lang.String> |
targetTableProps() |
protected org.apache.spark.sql.catalyst.catalog.CatalogTable |
v1SourceTable() |
SnapshotAction |
withLocation(java.lang.String location) |
CreateAction |
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Adds additional properties to the newly created Iceberg table.
|
CreateAction |
withProperty(java.lang.String key,
java.lang.String value)
Adds an additional property to the newly created Iceberg table.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
withProperties, withProperty
protected static final java.lang.String LOCATION
protected static final java.lang.String ICEBERG_METADATA_FOLDER
protected static final java.util.List<java.lang.String> EXCLUDED_PROPERTIES
public Spark3SnapshotAction(org.apache.spark.sql.SparkSession spark, org.apache.spark.sql.connector.catalog.CatalogPlugin sourceCatalog, org.apache.spark.sql.connector.catalog.Identifier sourceTableIdent, org.apache.spark.sql.connector.catalog.CatalogPlugin destCatalog, org.apache.spark.sql.connector.catalog.Identifier destTableIdent)
public java.lang.Long execute()
Action
protected java.util.Map<java.lang.String,java.lang.String> targetTableProps()
protected org.apache.spark.sql.connector.catalog.TableCatalog checkSourceCatalog(org.apache.spark.sql.connector.catalog.CatalogPlugin catalog)
public SnapshotAction withLocation(java.lang.String location)
withLocation
in interface SnapshotAction
public CreateAction withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
CreateAction
withProperties
in interface CreateAction
properties
- a map of properties to be includedpublic CreateAction withProperty(java.lang.String key, java.lang.String value)
CreateAction
withProperty
in interface CreateAction
key
- the key of the property to addvalue
- the value of the property to addprotected org.apache.spark.sql.SparkSession spark()
protected java.lang.String sourceTableLocation()
protected org.apache.spark.sql.catalyst.catalog.CatalogTable v1SourceTable()
protected org.apache.spark.sql.connector.catalog.TableCatalog sourceCatalog()
protected org.apache.spark.sql.connector.catalog.Identifier sourceTableIdent()
protected org.apache.spark.sql.connector.catalog.StagingTableCatalog destCatalog()
protected org.apache.spark.sql.connector.catalog.Identifier destTableIdent()
protected java.util.Map<java.lang.String,java.lang.String> additionalProperties()
protected StagedSparkTable stageDestTable()
protected void ensureNameMappingPresent(Table table)
protected java.lang.String getMetadataLocation(Table table)