HBASE-26458 Add UNSET_SNAPSHOT_PROP and fix TTL defaulting (#3857)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
1701f0de0a
commit
6d9da1314b
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue