【问题标题】:SnappyData -streaming table parameter "topics" clarificationSnappyData - 流表参数“主题”说明
【发布时间】:2016-08-20 05:04:47
【问题描述】:

我正在阅读文档 (http://snappydatainc.github.io/snappydata/streamingWithSQL/) 并想知道使用 kafka 时主题名称后面的参数“:01”是什么意思。这是服务器正在使用的分区号还是线程数?

ie: "主题'streamTopic:01'

val sc = new SparkContext(new SparkConf().setAppName("example").setMaster("local[*]"))
val snc = SnappyContext.getOrCreate(sc)
var snsc = SnappyStreamingContext(snc, Seconds(1))

snsc.sql("create stream table streamTable (userId string, clickStreamLog string) " +
    "using kafka_stream options (" +
    "storagelevel 'MEMORY_AND_DISK_SER_2', " +
    "rowConverter 'io.snappydata.app.streaming.KafkaStreamToRowsConverter', " +
    "zkQuorum 'localhost:2181', " +
    "groupId 'streamConsumer', " +
    "topics 'streamTopic:01')")

很抱歉,如果某处提到了这个,但我找不到它。

【问题讨论】:

    标签: parameters streaming snappydata


    【解决方案1】:

    这应该只是主题名称。 Spark Streaming 将计算出 kafka 分区的数量并启动足够的并行任务以进行摄取。

    见另一个例子here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-12-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-25
      • 2021-12-21
      • 1970-01-01
      相关资源
      最近更新 更多