-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Remove the use of metric.reporters
in OAuth metrics, use strimzi.metric.reporters
instead
#193
Changes from all commits
39030c5
9827715
dede670
db294ff
611c52c
78969ed
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright 2017-2023, Strimzi authors. | ||
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). | ||
*/ | ||
package io.strimzi.kafka.oauth.metrics; | ||
|
||
import io.strimzi.kafka.oauth.common.Config; | ||
|
||
/** | ||
* Configuration that can be specified as ENV vars, System properties or in <code>server.properties</code> configuration file, | ||
* but not as part of the JAAS configuration. | ||
*/ | ||
public class GlobalConfig extends Config { | ||
|
||
/** The name of the 'strimzi.oauth.metric.reporters' config option */ | ||
public static final String STRIMZI_OAUTH_METRIC_REPORTERS = "strimzi.oauth.metric.reporters"; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,13 @@ public static synchronized void configure(Map<String, ?> configs) { | |
} | ||
} | ||
|
||
/** | ||
* Close any configured Services so they can be reinitialised again | ||
*/ | ||
public static synchronized void close() { | ||
services = null; | ||
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. This is not really closing services 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. Maybe one day it will be. There are at the moment no threads running in there so I simply release the memory. You think this should be called differently or the docs should be different or you think the implementation should be different? |
||
} | ||
|
||
/** | ||
* Get a configured singleton instance | ||
* | ||
|
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.
Not a comment about this PR, really an observation about Kafka being inconsistent/the
Configurable
contract being rather weak. IfConfigurable
itself isn't going to specify whetherconfigure()
is getting theoriginals
, or some filtered subset then it should be documented on each subclass what is passed. Thoughts @mimaison?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.
I thought the "contract" was to always pass
originals
to plugins so they can have custom configurations.https://issues.apache.org/jira/browse/KAFKA-7588
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.
Then @mstruk which plugin did you find where the
originals
weren't propagated toconfigure()
?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.
It is the inter-broker communication client that gets initialized with the already parsed Configuration object, which then no longer contains Map<String, String> but Map<String, ?> and the unrecognised config options are missing.