Skip to content

Commit

Permalink
[core] Fix db2 connector compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
TyrantLucifer committed Apr 22, 2023
1 parent 5f3e7e7 commit 2cf8b83
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 8 deletions.
7 changes: 0 additions & 7 deletions flink-connector-db2-cdc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ under the License.

<dependencies>

<!-- flink cdc base -->
<dependency>
<groupId>com.ververica</groupId>
<artifactId>flink-cdc-base</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Debezium dependencies -->
<dependency>
<groupId>com.ververica</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.apache.flink.table.factories.DynamicTableSourceFactory;
import org.apache.flink.table.factories.FactoryUtil;

import com.ververica.cdc.connectors.base.utils.OptionUtils;
import com.ververica.cdc.connectors.db2.utils.OptionUtils;

import java.time.ZoneId;
import java.util.HashSet;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright 2022 Ververica Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.ververica.cdc.connectors.db2.utils;

import org.apache.flink.configuration.ConfigOption;
import org.apache.flink.configuration.ReadableConfig;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Arrays;
import java.util.List;

/** A utility class to print configuration of connectors. */
public class OptionUtils {

private static final Logger LOG = LoggerFactory.getLogger(OptionUtils.class);

private static final List<String> SENSITIVE_OPTIONS = Arrays.asList("password");

private static final String SHADE = "**********";

/** Utility class can not be instantiated. */
private OptionUtils() {}

public static void printOptions(ReadableConfig config, ConfigOption<?>... options) {
for (ConfigOption<?> option : options) {
if (SENSITIVE_OPTIONS.contains(option.key())) {
LOG.info("{} = {}", option.key(), SHADE);
} else {
LOG.info("{} = {}", option.key(), config.get(option));
}
}
}
}

0 comments on commit 2cf8b83

Please sign in to comment.