-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-25548 Optionally allow snapshots to preserve cluster's max file… #2923
Conversation
…size config by setting it into table descriptor
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Could you add a short description to reference guide?
Please fix the typo in the config name and the whitespace/checkstyle issue.
@@ -150,6 +150,9 @@ | |||
/** number of current operations running on the master */ | |||
public static final int SNAPSHOT_POOL_THREADS_DEFAULT = 1; | |||
|
|||
/** Conf key for preserving original max file size configs */ | |||
public static final String SNAPSHOT_MAX_FILE_SIZE_PRESERVE = "hbase.snpashot.max.filesize.preserve"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: snpashot
💔 -1 overall
This message was automatically generated. |
I had a thought that with this change the HBase level configuration for the region size will become table level configuration for a restored snapshot. This is a highly hidden consequence of setting It might be better from an operational viewpoint to add an extra flag for creating a snapshot to preserve the system's region size for a configuration and do not use this feature for every snapshot in the cluster. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
TableDescriptor htd = | ||
this.master.getTableDescriptors().get(snapshotTable); | ||
if (htd == null) { | ||
throw new IOException("TableDescriptor missing for " + snapshotTable); | ||
} | ||
if(htd.getMaxFileSize()==-1 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we have max file size already set on a table (at src cluster) we will be preserving it in snapshot's HTD anyways right. Just confirming.
Also while taking snapshot, we can pass in this new config hbase.snapshot.max.filesize.preserve = true right?
Very useful feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we have max file size already set on a table (at src cluster) we will be preserving it in snapshot's HTD anyways right. Just confirming.
Yes, it won't be overridden by the system's region size configuration.
Also while taking snapshot, we can pass in this new config hbase.snapshot.max.filesize.preserve = true right?
Very useful feature.
The current proposal sets this at the system level so all snapshots taken will use this. I'd also like this configuration to be passed at snapshot creation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reviews and suggestions @anoopsjohn @petersomogyi . I'm falling behind a bit, but will be putting it in an upcoming commit on the following days.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current proposal sets this at the system level so all snapshots taken will use this. I'd also like this configuration to be passed at snapshot creation.
Sure. +1 for handling it as follow up issue
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3863e99
to
2779089
Compare
… max_filesize as command property
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Please fix the reported static checks. I only have 1 question on the shell help text.
Had addressed the whitespace and checkstyle issues. I'm not sure about the reported spotbugs issue, it's complaining about |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…size config by setting it into table descriptor