liuml07 commented on a change in pull request #371: HBASE-22648 : Introducing
Snapshot TTL
URL: https://github.com/apache/hbase/pull/371#discussion_r302255684
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.java
##########
@@ -300,6 +303,16 @@ public static SnapshotDescription
validate(SnapshotDescription snapshot, Configu
snapshot = builder.build();
}
+ long ttl = snapshot.getTtl();
+ // set default ttl(sec) if it is not set already or the value is out of
the range
+ if (ttl == SnapshotDescriptionUtils.NO_SNAPSHOT_TTL_SPECIFIED ||
+ ttl > (Long.MAX_VALUE / 1000)) {
+ ttl = HConstants.DEFAULT_SNAPSHOT_TTL;
+ }
+ SnapshotDescription.Builder builder = snapshot.toBuilder();
Review comment:
Should the snapshot build with ttl optional here, i.e. move to `if` clause
above?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services