-
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-28716: Users of QuotaRetriever should pass an existing connection (master) #6065
Changes from 2 commits
a247c98
dd42a14
80dd227
6caf25e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,7 +168,7 @@ Multimap<TableName, String> getSnapshotsToComputeSize() throws IOException { | |
filter.addTypeFilter(QuotaType.SPACE); | ||
try (Admin admin = conn.getAdmin()) { | ||
// Pull all of the tables that have quotas (direct, or from namespace) | ||
for (QuotaSettings qs : QuotaRetriever.open(conf, filter)) { | ||
for (QuotaSettings qs : QuotaRetriever.open(conn, filter)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you mind also promoting uses of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, you got it! |
||
if (qs.getQuotaType() == QuotaType.SPACE) { | ||
String ns = qs.getNamespace(); | ||
TableName tn = qs.getTableName(); | ||
|
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.
Because this is
IA.Public
, you cannot make these blanket changes in one pass. You'll need to observe a deprecation cycle through a major release in order to make breaking changes to the public API.We document this in depth over on https://hbase.apache.org/book.html#hbase.versioning
If we're going through the trouble to make breaking changes, let's push RAII and do away with the parameterless constructor + init method.
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.
+1 for the deprecation cycle.
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.
Since we're opening this worm-can, how about we get rid of these static constructor methods and use constructors like a normal object?