blob: 610bd35ee02821355350705e6c156ee16bb0c306 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="replica_preference" rev="2.7.0">
<title>REPLICA_PREFERENCE Query Option (<keyword keyref="impala27"/> or higher only)</title>
<titlealts audience="PDF"><navtitle>REPLICA_PREFERENCE</navtitle></titlealts>
<prolog>
<metadata>
<data name="Category" value="Impala"/>
<data name="Category" value="Impala Query Options"/>
<data name="Category" value="Developers"/>
<data name="Category" value="Data Analysts"/>
</metadata>
</prolog>
<conbody>
<p rev="2.7.0">
<indexterm audience="hidden">REPLICA_PREFERENCE query option</indexterm>
</p>
<p>
The <codeph>REPLICA_PREFERENCE</codeph> query option
lets you spread the load more evenly if hotspots and bottlenecks persist, by allowing hosts to do local reads,
or even remote reads, to retrieve the data for cached blocks if Impala can determine that it would be
too expensive to do all such processing on a particular host.
</p>
<p>
<b>Type:</b> numeric (0, 3, 5)
or corresponding mnemonic strings (<codeph>CACHE_LOCAL</codeph>, <codeph>DISK_LOCAL</codeph>, <codeph>REMOTE</codeph>).
The gaps in the numeric sequence are to accomodate other intermediate
values that might be added in the future.
</p>
<p>
<b>Default:</b> 0 (equivalent to <codeph>CACHE_LOCAL</codeph>)
</p>
<p conref="../shared/impala_common.xml#common/added_in_270"/>
<p conref="../shared/impala_common.xml#common/related_info"/>
<p>
<xref href="impala_perf_hdfs_caching.xml#hdfs_caching"/>, <xref href="impala_schedule_random_replica.xml#schedule_random_replica"/>
</p>
</conbody>
</concept>