Skip to content
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

fix: checkstyle violations in KsqlConfig #10050

Merged
merged 1 commit into from Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -81,15 +81,17 @@ public enum DeploymentType {
}

public static final String KSQL_DEPLOYMENT_TYPE_DOC =
"The type of deployment for ksql. Value must be one of " + Arrays.asList(DeploymentType.values());
"The type of deployment for ksql. Value must be one of "
+ Arrays.asList(DeploymentType.values());

public static final String METRIC_REPORTER_CLASSES_CONFIG =
CommonClientConfigs.METRIC_REPORTER_CLASSES_CONFIG;

public static final String METRIC_REPORTER_CLASSES_DOC =
CommonClientConfigs.METRIC_REPORTER_CLASSES_DOC;

private static final String TELEMETRY_REPORTER_CLASS = "io.confluent.telemetry.reporter.TelemetryReporter";
private static final String TELEMETRY_REPORTER_CLASS =
"io.confluent.telemetry.reporter.TelemetryReporter";

private static final String TELEMETRY_PREFIX = "confluent.telemetry";
private static final Set<String> REPORTER_CONFIGS_PREFIXES =
Expand Down Expand Up @@ -871,7 +873,7 @@ private static ConfigDef configDef(final ConfigGeneration generation) {
return generation == ConfigGeneration.CURRENT ? CURRENT_DEF : LEGACY_DEF;
}

private static DeploymentType parseDeploymentType(Object value) {
private static DeploymentType parseDeploymentType(final Object value) {
try {
return DeploymentType.valueOf(value.toString());
} catch (IllegalArgumentException e) {
Expand Down Expand Up @@ -1721,9 +1723,10 @@ private KsqlConfig(final ConfigGeneration generation,
this.ksqlStreamConfigProps = ksqlStreamConfigProps;
}

private void possiblyConfigureConfluentTelemetry(Map<String, Object> map) {
if (KsqlConfig.DeploymentType.confluent.toString().equals(getString(KSQL_DEPLOYMENT_TYPE_CONFIG))) {
List<String> metricReporters = new ArrayList<>(getList(METRIC_REPORTER_CLASSES_CONFIG));;
private void possiblyConfigureConfluentTelemetry(final Map<String, Object> map) {
if (KsqlConfig.DeploymentType.confluent.toString()
.equals(getString(KSQL_DEPLOYMENT_TYPE_CONFIG))) {
final List<String> metricReporters = new ArrayList<>(getList(METRIC_REPORTER_CLASSES_CONFIG));
metricReporters.remove(TELEMETRY_REPORTER_CLASS);
map.put(METRIC_REPORTER_CLASSES_CONFIG, metricReporters);
} else {
Expand Down