Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace _ with - in config property names #23876

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ public DataSize getFaultTolerantExecutionEagerSpeculativeTasksNodeMemoryOvercomm
return faultTolerantExecutionEagerSpeculativeTasksNodeMemoryOvercommit;
}

@Config("fault-tolerant-execution-eager-speculative-tasks-node_memory-overcommit")
@Config("fault-tolerant-execution-eager-speculative-tasks-node-memory-overcommit")
@LegacyConfig("fault-tolerant-execution-eager-speculative-tasks-node_memory-overcommit")
public MemoryManagerConfig setFaultTolerantExecutionEagerSpeculativeTasksNodeMemoryOvercommit(DataSize faultTolerantExecutionEagerSpeculativeTasksNodeMemoryOvercommit)
{
this.faultTolerantExecutionEagerSpeculativeTasksNodeMemoryOvercommit = faultTolerantExecutionEagerSpeculativeTasksNodeMemoryOvercommit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void testExplicitPropertyMappings()
.put("fault-tolerant-execution-task-memory-estimation-quantile", "0.7")
.put("fault-tolerant-execution-task-runtime-memory-estimation-overhead", "300MB")
.put("fault-tolerant-execution-memory-requirement-increase-on-worker-crash-enabled", "false")
.put("fault-tolerant-execution-eager-speculative-tasks-node_memory-overcommit", "21GB")
.put("fault-tolerant-execution-eager-speculative-tasks-node-memory-overcommit", "21GB")
.put("query.low-memory-killer.policy", "none")
.put("task.low-memory-killer.policy", "none")
.buildOrThrow();
Expand Down
8 changes: 4 additions & 4 deletions docs/src/main/sphinx/connector/iceberg.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ implementation is used:
- Set to `false` to disable in-memory caching of metadata files on the
coordinator. This cache is not used when `fs.cache.enabled` is set to true.
- `true`
* - `iceberg.expire_snapshots.min-retention`
* - `iceberg.expire-snapshots.min-retention`
- Minimal retention period for the
[`expire_snapshot` command](iceberg-expire-snapshots).
Equivalent session property is `expire_snapshots_min_retention`.
- `7d`
* - `iceberg.remove_orphan_files.min-retention`
* - `iceberg.remove-orphan-files.min-retention`
- Minimal retention period for the
[`remove_orphan_files` command](iceberg-remove-orphan-files).
Equivalent session property is `remove_orphan_files_min_retention`.
Expand Down Expand Up @@ -744,7 +744,7 @@ ALTER TABLE test_table EXECUTE expire_snapshots(retention_threshold => '7d')
```

The value for `retention_threshold` must be higher than or equal to
`iceberg.expire_snapshots.min-retention` in the catalog, otherwise the
`iceberg.expire-snapshots.min-retention` in the catalog, otherwise the
procedure fails with a similar message: `Retention specified (1.00d) is shorter
than the minimum retention configured in the system (7.00d)`. The default value
for this property is `7d`.
Expand All @@ -764,7 +764,7 @@ ALTER TABLE test_table EXECUTE remove_orphan_files(retention_threshold => '7d')
```

The value for `retention_threshold` must be higher than or equal to
`iceberg.remove_orphan_files.min-retention` in the catalog otherwise the
`iceberg.remove-orphan-files.min-retention` in the catalog otherwise the
procedure fails with a similar message: `Retention specified (1.00d) is shorter
than the minimum retention configured in the system (7.00d)`. The default value
for this property is `7d`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public class IcebergConfig
public static final String EXTENDED_STATISTICS_CONFIG = "iceberg.extended-statistics.enabled";
public static final String EXTENDED_STATISTICS_DESCRIPTION = "Enable collection (ANALYZE) and use of extended statistics.";
public static final String COLLECT_EXTENDED_STATISTICS_ON_WRITE_DESCRIPTION = "Collect extended statistics during writes";
public static final String EXPIRE_SNAPSHOTS_MIN_RETENTION = "iceberg.expire_snapshots.min-retention";
public static final String REMOVE_ORPHAN_FILES_MIN_RETENTION = "iceberg.remove_orphan_files.min-retention";
public static final String EXPIRE_SNAPSHOTS_MIN_RETENTION = "iceberg.expire-snapshots.min-retention";
public static final String REMOVE_ORPHAN_FILES_MIN_RETENTION = "iceberg.remove-orphan-files.min-retention";

private IcebergFileFormat fileFormat = PARQUET;
private HiveCompressionCodec compressionCodec = ZSTD;
Expand Down Expand Up @@ -305,6 +305,7 @@ public Duration getExpireSnapshotsMinRetention()
}

@Config(EXPIRE_SNAPSHOTS_MIN_RETENTION)
@LegacyConfig("iceberg.expire_snapshots.min-retention")
@ConfigDescription("Minimal retention period for expire_snapshot procedure")
public IcebergConfig setExpireSnapshotsMinRetention(Duration expireSnapshotsMinRetention)
{
Expand All @@ -319,6 +320,7 @@ public Duration getRemoveOrphanFilesMinRetention()
}

@Config(REMOVE_ORPHAN_FILES_MIN_RETENTION)
@LegacyConfig("iceberg.remove_orphan_files.min-retention")
@ConfigDescription("Minimal retention period for remove_orphan_files procedure")
public IcebergConfig setRemoveOrphanFilesMinRetention(Duration removeOrphanFilesMinRetention)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6218,7 +6218,7 @@ public void testExpireSnapshotsParameterValidation()
"\\Qline 1:46: Unable to set catalog 'iceberg' table procedure 'EXPIRE_SNAPSHOTS' property 'retention_threshold' to ['33mb']: Unknown time unit: mb");
assertQueryFails(
"ALTER TABLE nation EXECUTE EXPIRE_SNAPSHOTS (retention_threshold => '33s')",
"\\QRetention specified (33.00s) is shorter than the minimum retention configured in the system (7.00d). Minimum retention can be changed with iceberg.expire_snapshots.min-retention configuration property or iceberg.expire_snapshots_min_retention session property");
"\\QRetention specified (33.00s) is shorter than the minimum retention configured in the system (7.00d). Minimum retention can be changed with iceberg.expire-snapshots.min-retention configuration property or iceberg.expire_snapshots_min_retention session property");
}

@Test
Expand Down Expand Up @@ -6356,7 +6356,7 @@ public void testRemoveOrphanFilesParameterValidation()
"\\Qline 1:49: Unable to set catalog 'iceberg' table procedure 'REMOVE_ORPHAN_FILES' property 'retention_threshold' to ['33mb']: Unknown time unit: mb");
assertQueryFails(
"ALTER TABLE nation EXECUTE REMOVE_ORPHAN_FILES (retention_threshold => '33s')",
"\\QRetention specified (33.00s) is shorter than the minimum retention configured in the system (7.00d). Minimum retention can be changed with iceberg.remove_orphan_files.min-retention configuration property or iceberg.remove_orphan_files_min_retention session property");
"\\QRetention specified (33.00s) is shorter than the minimum retention configured in the system (7.00d). Minimum retention can be changed with iceberg.remove-orphan-files.min-retention configuration property or iceberg.remove_orphan_files_min_retention session property");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public void testExplicitPropertyMappings()
.put("iceberg.projection-pushdown-enabled", "false")
.put("iceberg.hive-catalog-name", "hive")
.put("iceberg.format-version", "1")
.put("iceberg.expire_snapshots.min-retention", "13h")
.put("iceberg.remove_orphan_files.min-retention", "14h")
.put("iceberg.expire-snapshots.min-retention", "13h")
.put("iceberg.remove-orphan-files.min-retention", "14h")
.put("iceberg.delete-schema-locations-fallback", "true")
.put("iceberg.target-max-file-size", "1MB")
.put("iceberg.idle-writer-min-file-size", "1MB")
Expand Down