Pulsar adaptor for Apache Spark

    Spark streaming 连接器

    Pulsar的Spark Streaming receiver经过专门的定制,使 Apache 能够从Pulsar接收数据.

    应用程序可以通过 Spark Streaming Pulsar receiver 接收 Resilient Distributed Dataset (RDD) 格式的数据,并可以通过多种方式对其进行处理.

    Maven

    如果你使用maven,添加以下内容到你的 pom.xml 中:

    Gradle

    如果你使用Gradle,添加以下内容到你的 中:

    用法

    For a complete example, click here. In this example, the number of messages that contain the string “Pulsar” in received messages is counted.

    请注意,如果需要,可以使用其他 Pulsar 认证类。 例如,为了在认证过程中使用令牌,可以为 构造函数设置以下参数。