Skip to content

Commit

Permalink
Skip archiving in Glue an old table version during a table update ope…
Browse files Browse the repository at this point in the history
…ration

Skip archiving old table version when committing a table in Iceberg
in order to avoid potentially reaching Glue table version quotas.
  • Loading branch information
findinpath committed Nov 15, 2023
1 parent 375d38d commit 6fd49b8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/src/main/sphinx/connector/metastores.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ described with the following additional property:
- Skip archiving an old table version when creating a new version in a commit.
See [AWS Glue Skip
Archive](https://iceberg.apache.org/docs/latest/aws/#skip-archive).
- `false`
- `true`
:::

## Iceberg-specific metastores
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
public class IcebergGlueCatalogConfig
{
private boolean cacheTableMetadata = true;
private boolean skipArchive;
private boolean skipArchive = true;

public boolean isCacheTableMetadata()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ public void testDefaults()
{
assertRecordedDefaults(recordDefaults(IcebergGlueCatalogConfig.class)
.setCacheTableMetadata(true)
.setSkipArchive(false));
.setSkipArchive(true));
}

@Test
public void testExplicitPropertyMapping()
{
Map<String, String> properties = ImmutableMap.<String, String>builder()
.put("iceberg.glue.cache-table-metadata", "false")
.put("iceberg.glue.skip-archive", "true")
.put("iceberg.glue.skip-archive", "false")
.buildOrThrow();

IcebergGlueCatalogConfig expected = new IcebergGlueCatalogConfig()
.setCacheTableMetadata(false)
.setSkipArchive(true);
.setSkipArchive(false);

assertFullMapping(properties, expected);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ protected QueryRunner createQueryRunner()
.setIcebergProperties(
ImmutableMap.<String, String>builder()
.put("iceberg.catalog.type", "glue")
.put("iceberg.glue.skip-archive", "true")
.put("hive.metastore.glue.default-warehouse-dir", schemaDirectory.getAbsolutePath())
.buildOrThrow())
.setSchemaInitializer(
Expand Down

0 comments on commit 6fd49b8

Please sign in to comment.