2016-08-19 46 views
1

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

即:“主题 'streamTopic:'

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')") 

很抱歉,如果这是什么地方提到,但我找不到它

回答

1

这应该仅是主题名称星火流。将计算出kafka分区的数量并启动足够的并行任务以供摄取。

查看另一个示例here