Modifier and Type | Method and Description |
---|---|
Distribution |
requiredDistribution()
Returns the distribution required by this write.
|
default int |
requiredNumPartitions()
Returns the number of partitions required by this write.
|
SortOrder[] |
requiredOrdering()
Returns the ordering required by this write.
|
description, supportedCustomMetrics, toBatch, toStreaming
Distribution requiredDistribution()
Spark will distribute incoming records across partitions to satisfy the required distribution before passing the records to the data source table on write.
Batch and micro-batch writes can request a particular data distribution. If a distribution is requested in the micro-batch context, incoming records in each micro batch will satisfy the required distribution (but not across micro batches). The continuous execution mode continuously processes streaming data and does not support distribution requirements.
Implementations may return UnspecifiedDistribution
if they don't require any specific
distribution of data on write.
default int requiredNumPartitions()
Implementations may override this to require a specific number of input partitions.
Note that Spark doesn't support the number of partitions on UnspecifiedDistribution
,
the query will fail if the number of partitions are provided but the distribution is
unspecified.
SortOrder[] requiredOrdering()
Spark will order incoming records within partitions to satisfy the required ordering before passing those records to the data source table on write.
Batch and micro-batch writes can request a particular data ordering. If an ordering is requested in the micro-batch context, incoming records in each micro batch will satisfy the required ordering (but not across micro batches). The continuous execution mode continuously processes streaming data and does not support ordering requirements.
Implementations may return an empty array if they don't require any specific ordering of data on write.