ForeachWriter
is the contract for a foreach writer that is a streaming format that controls streaming writes.
Note
|
ForeachWriter is set using foreach operator.
|
val foreachWriter = new ForeachWriter[String] { ... }
streamingQuery.
writeStream.
foreach(foreachWriter).
start
package org.apache.spark.sql
abstract class ForeachWriter[T] {
def open(partitionId: Long, version: Long): Boolean
def process(value: T): Unit
def close(errorOrNull: Throwable): Unit
}
Method | Description |
---|---|
Used when… |
|
Used when… |
|
Used when… |