Skip to content

Commit 2d50885

Browse files
author
xubo.huster
committed
[Bitsail][PG-CDC] add license header
1 parent 7c5fc1f commit 2d50885

File tree

16 files changed

+241
-14
lines changed

16 files changed

+241
-14
lines changed

bitsail-connectors/connector-cdc/connector-cdc-jdbc-base/src/main/java/com/bytedance/bitsail/connector/cdc/jdbc/source/config/AbstractJdbcDebeziumConfig.java

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.jdbc.source.config;
217

318
import com.bytedance.bitsail.common.configuration.BitSailConfiguration;
@@ -65,7 +80,7 @@ public static Properties extractProps(BitSailConfiguration jobConf) {
6580
public abstract RelationalDatabaseConnectorConfig getJdbcConnectorConfig(Configuration config);
6681

6782
public void fillConnectionInfo(Properties props, ConnectionInfo connectionInfo, String timezone) {
68-
props.put(DebeziumConstant.DATABASE_NAME, connectionInfo.getHost());
83+
props.put(DebeziumConstant.DATABASE_HOSTNAME, connectionInfo.getHost());
6984
props.put(DebeziumConstant.DATABASE_PORT, String.valueOf(connectionInfo.getPort()));
7085
props.put(DebeziumConstant.DATABASE_USER, username);
7186
props.put(DebeziumConstant.DATABASE_PASSWORD, password);

bitsail-connectors/connector-cdc/connector-cdc-jdbc-base/src/main/java/com/bytedance/bitsail/connector/cdc/jdbc/source/constant/DebeziumConstant.java

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.jdbc.source.constant;
217

3-
418
public class DebeziumConstant {
519
public static final String DATABASE_HOSTNAME = "database.hostname";
620
public static final String DATABASE_PORT = "database.port";

bitsail-connectors/connector-cdc/connector-cdc-jdbc-base/src/main/java/com/bytedance/bitsail/connector/cdc/jdbc/source/reader/AbstractJdbcChangeEventSplitReader.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.jdbc.source.reader;
217

318
import com.bytedance.bitsail.common.configuration.BitSailConfiguration;

bitsail-connectors/connector-cdc/connector-cdc-jdbc-base/src/main/java/com/bytedance/bitsail/connector/cdc/jdbc/source/streaming/AbstractSplitChangeEventStreamingTaskContext.java

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.jdbc.source.streaming;
217

318
import com.bytedance.bitsail.connector.cdc.source.split.BinlogSplit;
@@ -22,7 +37,6 @@
2237

2338
import java.sql.SQLException;
2439

25-
2640
@Getter
2741
public abstract class AbstractSplitChangeEventStreamingTaskContext {
2842

bitsail-connectors/connector-cdc/connector-cdc-jdbc-base/src/main/java/com/bytedance/bitsail/connector/cdc/jdbc/source/streaming/SplitChangeEventStreamingTaskController.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.jdbc.source.streaming;
217

318
import com.google.common.util.concurrent.ThreadFactoryBuilder;

bitsail-connectors/connector-cdc/connector-cdc-postgres/src/main/java/com/bytedance/bitsail/connector/cdc/postgres/source/PostgresChangeEventSource.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.postgres.source;
217

318
import com.bytedance.bitsail.base.connector.reader.v1.SourceReader;

bitsail-connectors/connector-cdc/connector-cdc-postgres/src/main/java/com/bytedance/bitsail/connector/cdc/postgres/source/config/PostgresConfig.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.postgres.source.config;
217

318
import com.bytedance.bitsail.common.configuration.BitSailConfiguration;

bitsail-connectors/connector-cdc/connector-cdc-postgres/src/main/java/com/bytedance/bitsail/connector/cdc/postgres/source/constant/PostgresConstant.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.postgres.source.constant;
217

318
public class PostgresConstant {

bitsail-connectors/connector-cdc/connector-cdc-postgres/src/main/java/com/bytedance/bitsail/connector/cdc/postgres/source/option/PostgresChangeEventOptions.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.postgres.source.option;
217

318
import com.bytedance.bitsail.common.option.ConfigOption;

bitsail-connectors/connector-cdc/connector-cdc-postgres/src/main/java/com/bytedance/bitsail/connector/cdc/postgres/source/reader/PostgresChangeEventReader.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.postgres.source.reader;
217

318
import com.bytedance.bitsail.common.configuration.BitSailConfiguration;

bitsail-connectors/connector-cdc/connector-cdc-postgres/src/main/java/com/bytedance/bitsail/connector/cdc/postgres/source/reader/PostgresChangeEventSplitReader.java

+15-11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.postgres.source.reader;
217

318
import com.bytedance.bitsail.common.configuration.BitSailConfiguration;
@@ -26,15 +41,4 @@ public AbstractJdbcDebeziumConfig getJdbcDebeziumConfig(BitSailConfiguration job
2641
public AbstractSplitChangeEventStreamingTaskContext getSplitReaderTaskContext(BinlogSplit split, RelationalDatabaseConnectorConfig connectorConfig) {
2742
return new PostgresChangeEventStreamingTaskContext(split, connectorConfig);
2843
}
29-
30-
@Override
31-
public void testConnectionAndValidBinlogConfiguration(RelationalDatabaseConnectorConfig connectorConfig) throws IOException {
32-
try {
33-
String testSql = "SELECT version()";
34-
this.splitChangeEventStreamingTaskContext.jdbcConnection.connect();
35-
this.splitChangeEventStreamingTaskContext.jdbcConnection.execute(testSql);
36-
} catch (SQLException e) {
37-
throw new RuntimeException("Failed to connect", e);
38-
}
39-
}
4044
}

bitsail-connectors/connector-cdc/connector-cdc-postgres/src/main/java/com/bytedance/bitsail/connector/cdc/postgres/source/streaming/PostgresChangeEventStreamingTaskContext.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.postgres.source.streaming;
217

318
import com.bytedance.bitsail.common.BitSailException;

bitsail-connectors/connector-cdc/connector-cdc-postgres/src/test/java/com/bytedance/bitsail/connector/cdc/postgres/container/PostgresContainerMariadbAdapter.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.postgres.container;
217

318
import org.testcontainers.containers.PostgreSQLContainer;

bitsail-connectors/connector-cdc/connector-cdc-postgres/src/test/java/com/bytedance/bitsail/connector/cdc/postgres/source/config/PostgresConfigTest.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.postgres.source.config;
217

318
import com.bytedance.bitsail.common.configuration.BitSailConfiguration;

bitsail-connectors/connector-cdc/connector-cdc-postgres/src/test/java/com/bytedance/bitsail/connector/cdc/postgres/source/debezium/PostgresChangeEventSplitContainerTest.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.postgres.source.debezium;
217

318
import com.bytedance.bitsail.common.configuration.BitSailConfiguration;

bitsail-connectors/connector-cdc/connector-cdc-postgres/src/test/java/com/bytedance/bitsail/connector/cdc/postgres/source/reader/PostgresChangeEventReaderTest.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022-2023 Bytedance Ltd. and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.bytedance.bitsail.connector.cdc.postgres.source.reader;
217

318
import com.bytedance.bitsail.common.configuration.BitSailConfiguration;

0 commit comments

Comments
 (0)