virajjasani commented on a change in pull request #371: HBASE-22648 :
Introducing Snapshot TTL
URL: https://github.com/apache/hbase/pull/371#discussion_r304207256
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/SnapshotDescription.java
##########
@@ -63,46 +64,52 @@ public SnapshotDescription(String name, String table,
SnapshotType type) {
}
public SnapshotDescription(String name, TableName table, SnapshotType type) {
- this(name, table, type, null);
+ this(name, table, type, null, -1, -1, -1);
}
/**
- * @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version
with the TableName
- * instance instead.
* @see #SnapshotDescription(String, TableName, SnapshotType, String)
* @see <a
href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
+ * @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version
with the TableName
+ * instance instead.
*/
@Deprecated
public SnapshotDescription(String name, String table, SnapshotType type,
String owner) {
this(name, TableName.valueOf(table), type, owner);
}
public SnapshotDescription(String name, TableName table, SnapshotType type,
String owner) {
- this(name, table, type, owner, -1, -1);
+ this(name, table, type, owner, -1, -1, -1);
}
/**
+ * @see #SnapshotDescription(String, TableName, SnapshotType, String, long,
long, int)
+ * @see <a
href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use the version
with the TableName
* instance instead.
- * @see #SnapshotDescription(String, TableName, SnapshotType, String, long,
int)
- * @see <a
href="https://issues.apache.org/jira/browse/HBASE-16892">HBASE-16892</a>
*/
@Deprecated
public SnapshotDescription(String name, String table, SnapshotType type,
String owner,
long creationTime, int version) {
- this(name, TableName.valueOf(table), type, owner, creationTime, version);
+ this(name, TableName.valueOf(table), type, owner, creationTime, -1,
version);
}
public SnapshotDescription(String name, TableName table, SnapshotType type,
String owner,
- long creationTime, int version) {
+ long creationTime, long ttl, int version) {
Review comment:
Totally Agree with having minor attributes Map. Also, given that you are
fine with having getters and setters of ttl present for SnapshotDescription and
protos have well usable builder pattern, I believe it's fine to keep adding
each minor attribute explicitly to protos: Snapshot.proto and HBase.proto
----------------------------------------------------------------
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