-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Debezium Oracle Source #11520
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
Merged
Merged
Debezium Oracle Source #11520
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
663d871
Deebzium connector for oracle; build nar package; no tests
dlg99 d575373
Integration tests for Debezium Oracle Source
dlg99 524db52
Removed dependency on Oracle jdbc driver; user will have to provide it
dlg99 dbbfb2d
no retries for IO integration tests, too aggressive
dlg99 cd5c54f
moved Oracle Debezium Source integration test itno a separate CI acti…
dlg99 a6eb48c
limiting Oracle's memory for the DB
dlg99 7b97af9
increase timeout
dlg99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you 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. | ||
| # | ||
|
|
||
| name: CI - Integration - Pulsar-IO Oracle Source | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| push: | ||
| branches: | ||
| - branch-* | ||
|
|
||
| env: | ||
| MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 | ||
|
|
||
| jobs: | ||
|
|
||
| pulsar-io: | ||
| name: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 120 | ||
|
|
||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Tune Runner VM | ||
| uses: ./.github/actions/tune-runner-vm | ||
|
|
||
| - name: Detect changed files | ||
| id: changes | ||
| uses: apache/pulsar-test-infra/paths-filter@master | ||
| with: | ||
| filters: .github/changes-filter.yaml | ||
|
|
||
| - name: Check changed files | ||
| id: check_changes | ||
| run: echo "::set-output name=docs_only::${{ fromJSON(steps.changes.outputs.all_count) == fromJSON(steps.changes.outputs.docs_count) && fromJSON(steps.changes.outputs.docs_count) > 0 }}" | ||
|
|
||
| - name: Cache local Maven repository | ||
| if: ${{ steps.check_changes.outputs.docs_only != 'true' }} | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: | | ||
| ~/.m2/repository/*/*/* | ||
| !~/.m2/repository/org/apache/pulsar | ||
| key: ${{ runner.os }}-m2-dependencies-all-${{ hashFiles('**/pom.xml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-m2-dependencies-core-modules-${{ hashFiles('**/pom.xml') }} | ||
| ${{ runner.os }}-m2-dependencies-core-modules- | ||
|
|
||
| - name: Set up JDK 11 | ||
| uses: actions/setup-java@v2 | ||
| if: ${{ steps.check_changes.outputs.docs_only != 'true' }} | ||
| with: | ||
| distribution: 'adopt' | ||
| java-version: 11 | ||
|
|
||
| - name: clean disk | ||
| if: ${{ steps.check_changes.outputs.docs_only != 'true' }} | ||
| run: | | ||
| sudo swapoff -a | ||
| sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc | ||
| sudo apt clean | ||
| docker rmi $(docker images -q) -f | ||
| df -h | ||
|
|
||
| - name: run install by skip tests | ||
| if: ${{ steps.check_changes.outputs.docs_only != 'true' }} | ||
| run: mvn -q -B -ntp clean install -DskipTests | ||
|
|
||
| - name: build pulsar image | ||
| if: ${{ steps.check_changes.outputs.docs_only != 'true' }} | ||
| run: mvn -B -f docker/pulsar/pom.xml install -am -Pdocker,-main -DskipTests -Ddocker.nocache=true | ||
|
|
||
| - name: build pulsar-all image | ||
| if: ${{ steps.check_changes.outputs.docs_only != 'true' }} | ||
| run: mvn -B -f docker/pulsar-all/pom.xml install -am -Pdocker,-main -DskipTests -Ddocker.nocache=true | ||
|
|
||
| - name: build artifacts and docker image | ||
| if: ${{ steps.check_changes.outputs.docs_only != 'true' }} | ||
| run: mvn -B -f tests/docker-images/pom.xml install -am -Pdocker,-main -DskipTests | ||
|
|
||
| - name: run integration tests | ||
| if: ${{ steps.check_changes.outputs.docs_only != 'true' }} | ||
| run: ./build/run_integration_group.sh PULSAR_IO_ORA | ||
|
|
||
| - name: Upload container logs | ||
| uses: actions/upload-artifact@v2 | ||
| if: ${{ cancelled() || failure() }} | ||
| continue-on-error: true | ||
| with: | ||
| name: container-logs | ||
| path: tests/integration/target/container-logs | ||
|
|
||
| - name: Upload surefire-reports | ||
| uses: actions/upload-artifact@v2 | ||
| if: ${{ cancelled() || failure() }} | ||
| continue-on-error: true | ||
| with: | ||
| name: surefire-reports | ||
| path: tests/integration/target/surefire-reports |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <!-- | ||
|
|
||
| Licensed to the Apache Software Foundation (ASF) under one | ||
| or more contributor license agreements. See the NOTICE file | ||
| distributed with this work for additional information | ||
| regarding copyright ownership. The ASF licenses this file | ||
| to you 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. | ||
|
|
||
| --> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| <parent> | ||
| <groupId>org.apache.pulsar</groupId> | ||
| <artifactId>pulsar-io-debezium</artifactId> | ||
| <version>2.9.0-SNAPSHOT</version> | ||
| </parent> | ||
|
|
||
| <artifactId>pulsar-io-debezium-oracle</artifactId> | ||
| <name>Pulsar IO :: Debezium :: oracle</name> | ||
|
|
||
| <dependencies> | ||
|
|
||
| <dependency> | ||
| <groupId>${project.groupId}</groupId> | ||
| <artifactId>pulsar-io-debezium-core</artifactId> | ||
| <version>${project.version}</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>io.debezium</groupId> | ||
| <artifactId>debezium-connector-oracle</artifactId> | ||
| <version>${debezium.version}</version> | ||
| </dependency> | ||
|
|
||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.nifi</groupId> | ||
| <artifactId>nifi-nar-maven-plugin</artifactId> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
|
|
||
| </project> |
37 changes: 37 additions & 0 deletions
37
...ezium/oracle/src/main/java/org/apache/pulsar/io/debezium/oracle/DebeziumOracleSource.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /** | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you 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 org.apache.pulsar.io.debezium.oracle; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| import org.apache.kafka.connect.runtime.TaskConfig; | ||
| import org.apache.pulsar.io.debezium.DebeziumSource; | ||
|
|
||
|
|
||
| /** | ||
| * A pulsar source that runs debezium oracle source | ||
| */ | ||
| public class DebeziumOracleSource extends DebeziumSource { | ||
| private static final String DEFAULT_TASK = "io.debezium.connector.oracle.OracleConnectorTask"; | ||
|
|
||
| @Override | ||
| public void setDbConnectorTask(Map<String, Object> config) throws Exception { | ||
| throwExceptionIfConfigNotMatch(config, TaskConfig.TASK_CLASS_CONFIG, DEFAULT_TASK); | ||
| } | ||
| } |
22 changes: 22 additions & 0 deletions
22
pulsar-io/debezium/oracle/src/main/resources/META-INF/services/pulsar-io.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you 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. | ||
| # | ||
|
|
||
| name: debezium-oracle | ||
| description: Debezium Oracle Source | ||
| sourceClass: org.apache.pulsar.io.debezium.oracle.DebeziumOracleSource |
38 changes: 38 additions & 0 deletions
38
pulsar-io/debezium/oracle/src/main/resources/debezium-oracle-source-config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you 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. | ||
| # | ||
|
|
||
| tenant: "public" | ||
| namespace: "default" | ||
| name: "debezium-oracle-source" | ||
| topicName: "debezium-oracle-topic" | ||
| archive: "connectors/pulsar-io-debezium-oracle-2.9.0-SNAPSHOT.nar" | ||
|
|
||
| parallelism: 1 | ||
|
|
||
| configs: | ||
| ## config for Oracle XE, docker image: https://github.com/MaksymBilenko/docker-oracle-12c | ||
| ## docker run -d -p 1521:1521 quay.io/maksymbilenko/oracle-12c | ||
| database.hostname: "localhost" | ||
|
eolivelli marked this conversation as resolved.
|
||
| database.port: "1521" | ||
| database.user: "sysdba" | ||
| database.password: "oracle" | ||
| database.dbname: "XE" | ||
| database.server.name: "XE" | ||
|
|
||
| database.history.pulsar.service.url: "pulsar://127.0.0.1:6650" | ||
|
eolivelli marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.