flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-9641) Pulsar Source Connector
Date Tue, 03 Jul 2018 18:31:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-9641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16531778#comment-16531778
] 

ASF GitHub Bot commented on FLINK-9641:
---------------------------------------

Github user cckellogg commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6200#discussion_r199909793
  
    --- Diff: flink-connectors/flink-connector-pulsar/src/test/java/org/apache/flink/streaming/connectors/pulsar/PulsarConsumerSourceTests.java
---
    @@ -0,0 +1,513 @@
    +/*
    + * 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.flink.streaming.connectors.pulsar;
    +
    +import org.apache.flink.api.common.functions.RuntimeContext;
    +import org.apache.flink.api.common.serialization.SimpleStringSchema;
    +import org.apache.flink.api.common.state.OperatorStateStore;
    +import org.apache.flink.api.java.tuple.Tuple2;
    +import org.apache.flink.configuration.Configuration;
    +import org.apache.flink.runtime.checkpoint.OperatorSubtaskState;
    +import org.apache.flink.runtime.state.FunctionInitializationContext;
    +import org.apache.flink.streaming.api.functions.source.SourceFunction;
    +import org.apache.flink.streaming.api.operators.StreamSource;
    +import org.apache.flink.streaming.api.operators.StreamingRuntimeContext;
    +import org.apache.flink.streaming.api.watermark.Watermark;
    +import org.apache.flink.streaming.util.AbstractStreamOperatorTestHarness;
    +
    +import org.apache.pulsar.client.api.Consumer;
    +import org.apache.pulsar.client.api.ConsumerStats;
    +import org.apache.pulsar.client.api.Message;
    +import org.apache.pulsar.client.api.MessageId;
    +import org.apache.pulsar.client.api.PulsarClient;
    +import org.apache.pulsar.client.api.PulsarClientException;
    +import org.apache.pulsar.client.api.Schema;
    +import org.apache.pulsar.client.impl.MessageImpl;
    +import org.junit.After;
    +import org.junit.Assert;
    +import org.junit.Before;
    +import org.junit.Test;
    +import org.mockito.Mockito;
    +
    +import java.util.ArrayDeque;
    +import java.util.ArrayList;
    +import java.util.Collections;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.Random;
    +import java.util.Set;
    +import java.util.concurrent.CompletableFuture;
    +import java.util.concurrent.ConcurrentHashMap;
    +import java.util.concurrent.TimeUnit;
    +import java.util.concurrent.atomic.AtomicInteger;
    +
    +import static org.mockito.Matchers.any;
    +
    +/**
    + * Tests for the PulsarConsumerSource. The source supports two operation modes.
    + * 1) At-least-once (when checkpointed) with Pulsar message acknowledgements and the
deduplication mechanism in
    + *    {@link org.apache.flink.streaming.api.functions.source.MessageAcknowledgingSourceBase}..
    + * 3) No strong delivery guarantees (without checkpointing) with Pulsar acknowledging
messages after
    + *	  after it receives x number of messages.
    + *
    + * <p>This tests assumes that the MessageIds are increasing monotonously. That
doesn't have to be the
    + * case. The MessageId is used to uniquely identify messages.
    + */
    +public class PulsarConsumerSourceTests {
    +
    +	private PulsarConsumerSource<String> source;
    +
    +	private TestConsumer consumer;
    +
    +	private TestSourceContext context;
    +
    +	private Thread sourceThread;
    +
    +	private Exception exception;
    --- End diff --
    
    will fix


> Pulsar Source Connector
> -----------------------
>
>                 Key: FLINK-9641
>                 URL: https://issues.apache.org/jira/browse/FLINK-9641
>             Project: Flink
>          Issue Type: New Feature
>          Components: Streaming Connectors
>            Reporter: Chris Kellogg
>            Priority: Minor
>              Labels: pull-request-available
>
> Pulsar (https://github.com/apache/incubator-pulsar) is a distributed pub-sub messaging
system currently in apache incubation. It is a very active project and there are committers
from various companies and good adoption. This pr will add a source function to allow Flink
jobs to process messages from Pulsar topics.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message