2016-08-19 45 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