封鎖直到所有可用資料都處理完畢並提交到匯入匯入。 用於測試。
語法
processAllAvailable()
退貨
None
Notes
在持續傳入的資料情況下,此方法可能會永久阻塞。 此方法僅保證阻塞,直到在調用前同步附加到串流來源的資料(即 getOffset 必須立即反映新增內容)。
Examples
sdf = spark.readStream.format("rate").load()
sq = sdf.writeStream.format('memory').queryName('this_query').start()
sq.processAllAvailable()
sq.stop()