Skip to content

Commit e7f7e26

Browse files
steveburnettimjalpreet
authored andcommitted
Add node selection strategy documentation
1 parent 55df185 commit e7f7e26

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

presto-docs/src/main/sphinx/connector/iceberg.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,8 @@ Property Name Description
541541
assign a split to. Splits which read data from the same file within
542542
the same chunk will hash to the same node. A smaller chunk size will
543543
result in a higher probability splits being distributed evenly across
544-
the cluster, but reduce locality.
544+
the cluster, but reduce locality.
545+
See :ref:`develop/connectors:Node Selection Strategy`.
545546
``iceberg.parquet_dereference_pushdown_enabled`` Overrides the behavior of the connector property Yes No
546547
``iceberg.enable-parquet-dereference-pushdown`` in the current session.
547548
===================================================== ======================================================================= =================== =============================================

presto-docs/src/main/sphinx/develop/connectors.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ you adapt your data source to the API expected by Presto, you can write
88
queries against this data.
99

1010
ConnectorSplit
11-
----------------
11+
--------------
12+
1213
Instances of your connector splits.
1314

1415
The ``getNodeSelectionStrategy`` method indicates the node affinity
@@ -81,3 +82,14 @@ Given a split and a list of columns, the record set provider is
8182
responsible for delivering data to the Presto execution engine.
8283
It creates a ``RecordSet``, which in turn creates a ``RecordCursor``
8384
that is used by Presto to read the column values for each row.
85+
86+
Node Selection Strategy
87+
-----------------------
88+
89+
The node selection strategy is specified by a connector on each split. The possible values are:
90+
91+
* HARD_AFFINITY - The Presto runtime must schedule this split on the nodes specified on ``ConnectorSplit#getPreferredNodes``.
92+
* SOFT_AFFINITY - The Presto runtime should prefer ``ConnectorSplit#getPreferredNodes`` nodes, but doesn't have to. Use this value primarily for caching.
93+
* NO_PREFERENCE - No preference.
94+
95+
Use the ``node_selection_strategy`` session property in Hive and Iceberg to override this.

0 commit comments

Comments
 (0)