HBASE-26458 Add UNSET_SNAPSHOT_PROP and fix TTL defaulting (#3857)

Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
Joel Swiatek 2021-11-23 22:44:50 -08:00 committed by GitHub
parent 1701f0de0a
commit 6d9da1314b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -3712,7 +3712,10 @@ public class HBaseAdmin implements Admin {
builder.setTable(tableName.getNameAsString()); builder.setTable(tableName.getNameAsString());
builder.setName(snapshotName); builder.setName(snapshotName);
builder.setType(type); builder.setType(type);
builder.setTtl(getTtlFromSnapshotProps(snapshotProps)); long ttl = getTtlFromSnapshotProps(snapshotProps);
if (ttl != -1L && ttl < TimeUnit.MILLISECONDS.toSeconds(Long.MAX_VALUE)) {
builder.setTtl(ttl);
}
snapshot(builder.build()); snapshot(builder.build());
} }

View File

@ -2224,7 +2224,6 @@ Value 0 for this config indicates TTL: FOREVER
.Enable/Disable Snapshot Auto Cleanup on running cluster: .Enable/Disable Snapshot Auto Cleanup on running cluster:
By default, snapshot auto cleanup based on TTL would be enabled By default, snapshot auto cleanup based on TTL would be enabled