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

Add quality warnings to pulsar #32346

Merged
merged 2 commits into from
Aug 28, 2024
Merged
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
Expand Up @@ -31,12 +31,22 @@
import org.checkerframework.checker.nullness.qual.Nullable;
import org.joda.time.Instant;

/**
* Class for reading and writing from Apache Pulsar. Support is currently incomplete, and there may
* be bugs; see https://github.com/apache/beam/issues/31078 for more info, and comment in that issue
* if you run into issues with this IO.
*/
@SuppressWarnings({"rawtypes", "nullness"})
public class PulsarIO {

/** Static class, prevent instantiation. */
private PulsarIO() {}

/**
* Read from Apache Pulsar. Support is currently incomplete, and there may be bugs; see
* https://github.com/apache/beam/issues/31078 for more info, and comment in that issue if you run
* into issues with this IO.
*/
public static Read read() {
return new AutoValue_PulsarIO_Read.Builder()
.setPulsarClient(PulsarIOUtils.PULSAR_CLIENT_SERIALIZABLE_FUNCTION)
Expand Down Expand Up @@ -144,6 +154,11 @@ public PCollection<PulsarMessage> expand(PBegin input) {
}
}

/**
* Write to Apache Pulsar. Support is currently incomplete, and there may be bugs; see
* https://github.com/apache/beam/issues/31078 for more info, and comment in that issue if you run
* into issues with this IO.
*/
public static Write write() {
return new AutoValue_PulsarIO_Write.Builder().build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Transform for reading from Apache Pulsar. Support is currently incomplete, and there may be bugs;
* see https://github.com/apache/beam/issues/31078 for more info, and comment in that issue if you
* run into issues with this IO.
*/
@DoFn.UnboundedPerElement
@SuppressWarnings({"rawtypes", "nullness"})
public class ReadFromPulsarDoFn extends DoFn<PulsarSourceDescriptor, PulsarMessage> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.PulsarClientException;

/**
* Transform for writing to Apache Pulsar. Support is currently incomplete, and there may be bugs;
* see https://github.com/apache/beam/issues/31078 for more info, and comment in that issue if you
* run into issues with this IO.
*/
@DoFn.UnboundedPerElement
@SuppressWarnings({"rawtypes", "nullness"})
public class WriteToPulsarDoFn extends DoFn<byte[], Void> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** Transforms for reading and writing from Apache Pulsar. */
/**
* Transforms for reading and writing from Apache Pulsar. Support is currently incomplete, and there
* may be bugs; see https://github.com/apache/beam/issues/31078 for more info, and comment in that
* issue if you run into issues with this IO.
*/
package org.apache.beam.sdk.io.pulsar;
Loading