DStreams上的输出操作
通过输出操作,我们可以将DStream的数据存放到数据库或者文件系统这样的外部系统中。尽管实际上,输出操作允许经过转换后的数据被外部系统消耗,它们也会触发执行所有DStreams上的转换操作(与RDDs上的action操作类似)。目前,定义了如下的输出操作:
Output Operation | Meaning |
---|---|
print() | Prints first ten elements of every batch of data in a DStream on the driver node running the streaming application. This is useful for development and debugging. Python API This is calledpprint() in the Python API. |
saveAsTextFiles(prefix, [s |