Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"comment": "Modify this file in a trivial way to cause this test suite to run",
"modification": 1
}
1 change: 1 addition & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ PreCommit Jobs run in a schedule and also get triggered in a PR if relevant sour
| [ PreCommit Java Cassandra IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Cassandra_IO_Direct.yml) | N/A |`beam_PreCommit_Java_Cassandra_IO_Direct.json`| [![.github/workflows/beam_PreCommit_Java_Cassandra_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Cassandra_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Cassandra_IO_Direct.yml?query=event%3Aschedule) |
| [ PreCommit Java Cdap IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Cdap_IO_Direct.yml) | N/A |`beam_PreCommit_Java_Cdap_IO_Direct.json`| [![.github/workflows/beam_PreCommit_Java_Cdap_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Cdap_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Cdap_IO_Direct.yml?query=event%3Aschedule) |
| [ PreCommit Java Clickhouse IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Clickhouse_IO_Direct.yml) | N/A |`beam_PreCommit_Java_Clickhouse_IO_Direct.json`| [![.github/workflows/beam_PreCommit_Java_Clickhouse_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Clickhouse_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Clickhouse_IO_Direct.yml?query=event%3Aschedule) |
| [ PreCommit Java Couchbase IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Couchbase_IO_Direct.yml) | N/A |`beam_PreCommit_Java_Couchbase_IO_Direct.json`| [![.github/workflows/beam_PreCommit_Java_Couchbase_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Couchbase_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Couchbase_IO_Direct.yml?query=event%3Aschedule) |
| [ PreCommit Java Csv IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Csv_IO_Direct.yml) | N/A |`beam_PreCommit_Java_Csv_IO_Direct.json`| [![.github/workflows/beam_PreCommit_Java_Csv_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Csv_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Csv_IO_Direct.yml?query=event%3Aschedule) |
| [ PreCommit Java Datadog IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Datadog_IO_Direct.yml) | N/A |`beam_PreCommit_Java_Datadog_IO_Direct.json`| [![.github/workflows/beam_PreCommit_Java_Datadog_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Datadog_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Datadog_IO_Direct.yml?query=event%3Aschedule) |
| [ PreCommit Java Delta IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Delta_IO_Direct.yml) | N/A |`beam_PreCommit_Java_Delta_IO_Direct.json`| [![.github/workflows/beam_PreCommit_Java_Delta_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Delta_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Delta_IO_Direct.yml?query=event%3Aschedule) |
Expand Down
115 changes: 115 additions & 0 deletions .github/workflows/beam_PreCommit_Java_Couchbase_IO_Direct.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# 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: PreCommit Java Couchbase IO Direct

on:
push:
tags: ['v*']
branches: ['master', 'release-*']
paths:
- "sdks/java/io/couchbase/**"
- ".github/workflows/beam_PreCommit_Java_Couchbase_IO_Direct.yml"
pull_request:
branches: ['master', 'release-*']
paths:
- "sdks/java/io/couchbase/**"
- 'release/trigger_all_tests.json'
- '.github/trigger_files/beam_PreCommit_Java_Couchbase_IO_Direct.json'
schedule:
- cron: '15 1/6 * * *'
workflow_dispatch:

# Setting explicit permissions for the action
permissions:
actions: write
pull-requests: write
checks: write
contents: read
deployments: read
id-token: none
issues: write
discussions: read
packages: read
pages: read
repository-projects: read
security-events: read
statuses: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.sender.login }}'
cancel-in-progress: true

env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}

jobs:
beam_PreCommit_Java_Couchbase_IO_Direct:
name: ${{ matrix.job_name }}
strategy:
matrix:
job_name: ["beam_PreCommit_Java_Couchbase_IO_Direct"]
timeout-minutes: 60
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request' ||
(github.event_name == 'schedule' && github.repository == 'apache/beam') ||
github.event_name == 'workflow_dispatch'
runs-on: [self-hosted, ubuntu-24.04, main]
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Setup repository
uses: $/.github/actions/setup-action
- name: Setup environment
uses: $/.github/actions/setup-environment-action
- name: run Couchbase IO build script
uses: $/.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:java:io:couchbase:build
arguments: |
-PdisableSpotlessCheck=true \
-PdisableCheckStyle=true \
- name: Archive JUnit Test Results
uses: actions/upload-artifact@v7
if: ${{ !success() }}
with:
name: JUnit Test Results
path: "**/build/reports/tests/"
- name: Publish JUnit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.GITHUB_SHA }}'
comment_mode: 'off'
check_run: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
files: '**/build/test-results/**/*.xml'
large_files: true
- name: Archive SpotBugs Results
uses: actions/upload-artifact@v7
if: always()
with:
name: SpotBugs Results
path: '**/build/reports/spotbugs/*.html'
- name: Publish SpotBugs Results
uses: jwgmeligmeyling/spotbugs-github-action@v1.2
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
with:
name: Publish SpotBugs
path: '**/build/reports/spotbugs/*.html'
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@

## I/Os

* Added CouchbaseIO for reading with SQL++ queries and writing documents (Java) ([#18381](https://github.com/apache/beam/issues/18381)).
* Support for X source added (Java/Python) ([#X](https://github.com/apache/beam/issues/X)).
* (Java) FirestoreIO: added `RpcQosOptions.Builder.withRampupThrottlingDisabled()`, mirroring the existing DatastoreIO option, to opt out of the 500/50/5 write ramp-up ([#27170](https://github.com/apache/beam/issues/27170)).
* Added support for attributing BigQuery API quota and billing to a specific GCP project (quota project): `quota_project_id` parameter in `ReadFromBigQuery` or `--quota_project_id` pipeline option, honored by the Python BigQuery IO transforms (`WriteToBigQuery` with `FILE_LOADS` or `STREAMING_INSERTS`; not yet `STORAGE_WRITE_API`, which is Java-backed), `--bigQueryQuotaProjectId` pipeline option (Java), and `bigqueryio.WithQuotaProject` read/query option (Go) ([#37431](https://github.com/apache/beam/issues/37431)).
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ tasks.register("javaioPreCommit") {
dependsOn(":sdks:java:io:csv:build")
dependsOn(":sdks:java:io:cdap:build")
dependsOn(":sdks:java:io:clickhouse:build")
dependsOn(":sdks:java:io:couchbase:build")
dependsOn(":sdks:java:io:datadog:build")
dependsOn(":sdks:java:io:debezium:expansion-service:build")
dependsOn(":sdks:java:io:debezium:build")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ class BeamModulePlugin implements Plugin<Project> {
commons_lang3 : "org.apache.commons:commons-lang3:3.18.0",
commons_logging : "commons-logging:commons-logging:1.2",
commons_math3 : "org.apache.commons:commons-math3:3.6.1",
couchbase_java_client : "com.couchbase.client:java-client:3.12.2",
dbcp2 : "org.apache.commons:commons-dbcp2:$dbcp2_version",
delta_kernel_api : "io.delta:delta-kernel-api:$delta_lake_version",
delta_kernel_defaults : "io.delta:delta-kernel-defaults:$delta_lake_version",
Expand Down Expand Up @@ -934,6 +935,7 @@ class BeamModulePlugin implements Plugin<Project> {
testcontainers_base : "org.testcontainers:testcontainers:$testcontainers_version",
testcontainers_cassandra : "org.testcontainers:cassandra:$testcontainers_version",
testcontainers_clickhouse : "org.testcontainers:clickhouse:$testcontainers_version",
testcontainers_couchbase : "org.testcontainers:couchbase:$testcontainers_version",
testcontainers_elasticsearch : "org.testcontainers:elasticsearch:$testcontainers_version",
testcontainers_gcloud : "org.testcontainers:gcloud:$testcontainers_version",
testcontainers_jdbc : "org.testcontainers:jdbc:$testcontainers_version",
Expand Down
39 changes: 39 additions & 0 deletions sdks/java/io/couchbase/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* 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.
*/

plugins { id 'org.apache.beam.module' }
applyJavaNature( automaticModuleName: 'org.apache.beam.sdk.io.couchbase')

description = "Apache Beam :: SDKs :: Java :: IO :: Couchbase"
ext.summary = "IO to read and write on Couchbase."

dependencies {
implementation project(path: ":sdks:java:core", configuration: "shadow")
implementation library.java.couchbase_java_client
// Same versions as java-client's transitive dependencies; used directly in ReadFn and WriteFn.
implementation "io.projectreactor:reactor-core:3.6.9"
implementation "org.reactivestreams:reactive-streams:1.0.4"
implementation library.java.jackson_databind
implementation library.java.vendored_guava_32_1_2_jre
testImplementation project(path: ":sdks:java:core", configuration: "shadowTest")
testImplementation library.java.junit
testImplementation library.java.hamcrest
testImplementation library.java.testcontainers_couchbase
testRuntimeOnly library.java.slf4j_jdk14
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
}
Loading
Loading