ndimiduk commented on code in PR #6065:
URL: https://github.com/apache/hbase/pull/6065#discussion_r1680711136
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaRetriever.java:
##########
@@ -52,21 +50,9 @@ public class QuotaRetriever implements Closeable,
Iterable<QuotaSettings> {
private Connection connection;
private Table table;
- /**
- * Should QutoaRetriever manage the state of the connection, or leave it be.
- */
- private boolean isManagedConnection = false;
-
QuotaRetriever() {
Review Comment:
What a weird API. This class is decorated as `IA.Public` but it's only
created via these static factory method? Any what's with using the default
constructor + an `init` method -- what happened to RAII ?’
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaRetriever.java:
##########
@@ -156,26 +137,26 @@ public void remove() {
/**
* Open a QuotaRetriever with no filter, all the quota settings will be
returned.
- * @param conf Configuration object to use.
+ * @param conn Connection object to use.
* @return the QuotaRetriever
* @throws IOException if a remote or network exception occurs
*/
- public static QuotaRetriever open(final Configuration conf) throws
IOException {
- return open(conf, null);
+ public static QuotaRetriever open(final Connection conn) throws IOException {
Review Comment:
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.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]