The REPLICA_PREFERENCE
query option lets you distribute the work more
evenly if hotspots and bottlenecks persist. It causes the access cost of all replicas of a
data block to be considered equal to or worse than the configured value. This allows
Impala to schedule reads to suboptimal replicas (e.g. local in the presence of cached
ones) in order to distribute the work across more executor nodes.
Allowed values are: CACHE_LOCAL
(0
),
DISK_LOCAL
(2
), REMOTE
(4
)
Type: Enum
Default: CACHE_LOCAL (0)
Added in: Impala 2.7.0
Usage Notes:
By default Impala selects the best replica it can find in terms of access cost. The
preferred order is cached, local, and remote. With REPLICA_PREFERENCE
,
the preference of all replicas are capped at the selected value. For example, when
REPLICA_PREFERENCE
is set to DISK_LOCAL
, cached and
local replicas are treated with the equal preference. When set to
REMOTE
, all three types of replicas, cached, local, remote, are treated
with equal preference.
Related information:
Using HDFS Caching with Impala (Impala 2.1 or higher only), SCHEDULE_RANDOM_REPLICA Query Option (Impala 2.5 or higher only)