You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above command creates snapshot `snapshot1234` with TTL of 86400 sec(24 hours)
3153
+
The above command creates snapshot `snapshot1234` with TTL of 86400 sec(24 hours)
3154
3154
and hence, the snapshot is supposed to be cleaned up after 24 hours
3155
3155
3156
3156
3157
3157
3158
3158
.Default Snapshot TTL:
3159
+
- User specified default TTL with config `hbase.master.snapshot.ttl`
3160
+
- FOREVER if `hbase.master.snapshot.ttl` is not set
3159
3161
3160
-
- FOREVER by default
3161
-
- User specified Default TTL with config `hbase.master.snapshot.ttl`
3162
+
While creating a snapshot, if TTL in seconds is not explicitly specified, the above logic will be
3163
+
followed to determine the TTL. If no configs are changed, the default behavior is that all snapshots
3164
+
will be retained forever (until manual deletion). If a different default TTL behavior is desired,
3165
+
`hbase.master.snapshot.ttl` can be set to a default TTL in seconds. Any snapshot created without
3166
+
an explicit TTL will take this new value.
3162
3167
3168
+
NOTE: If `hbase.master.snapshot.ttl` is set, a snapshot with an explicit {TTL => 0} or
3169
+
{TTL => -1} will also take this value. In this case, a TTL < -1 (such as {TTL => -2} should be used
3170
+
to indicate FOREVER.
3163
3171
3164
-
While creating a Snapshot, if TTL in seconds is not specified, by default the snapshot
3165
-
would not be deleted automatically. i.e. it would be retained forever until it is
3166
-
manually deleted. However, the user can update this default TTL behavior by
3167
-
providing default TTL in sec for key: `hbase.master.snapshot.ttl`.
3168
-
Value 0 for this config indicates TTL: FOREVER
3172
+
To summarize concisely,
3169
3173
3174
+
1. Snapshot with TTL value < -1 will stay forever regardless of any server side config changes (until deleted manually by user).
3175
+
2. Snapshot with TTL value > 0 will be deleted automatically soon after TTL expires.
3176
+
3. Snapshot created without specifying TTL will always have TTL value represented by config `hbase.master.snapshot.ttl`. Default value of this config is 0, which represents: keep the snapshot forever (until deleted manually by user).
3177
+
4. From client side, TTL value 0 or -1 should never be explicitly provided because they will be treated same as snapshot without TTL (same as above point 3) and hence will use TTL as per value represented by config `hbase.master.snapshot.ttl`.
0 commit comments