Hedged Reads

Hadoop 2.4 introduced a new feature called hedged reads, in HDFS-5776. If
a read from a block is slow, the HDFS client starts up another parallel, 'hedged' read against a different block replica. The result of whichever read returns first is used, and the outstanding read
is cancelled. This feature helps in situations where a read occasionally takes a long time rather than when there is a systemic problem. Hedged reads can be enabled for HBase when the HFiles are
stored in HDFS. This feature is disabled by default.

Enabling Hedged Reads for HBase Using Cloudera Manager

Configure the HDFS Hedged Read Threadpool Size and HDFS Hedged Read Delay Threshold properties. The descriptions for
each of these properties on the configuration pages provide more information.

Click Save Changes to commit the changes.

Enabling Hedged Reads for HBase Using the Command Line

Important:

If you use Cloudera Manager, do not use these command-line instructions.

This information applies specifically to CDH 5.2.x. If you use an earlier version of
CDH, see the documentation for that version located at Cloudera Documentation.

To enable hedged reads for HBase, edit the hbase-site.xml file on each server. Set dfs.client.hedged.read.threadpool.size to
the number of threads to dedicate to running hedged threads, and set the dfs.client.hedged.read.threshold.millis configuration property to the number of milliseconds to
wait before starting a second read against a different block replica. Set dfs.client.hedged.read.threadpool.size to 0 or remove it from the configuration to disable the
feature. After changing these properties, restart your cluster.

If this documentation includes code, including but not limited to, code examples, Cloudera makes this available to you under the terms of the Apache License, Version 2.0, including any required
notices. A copy of the Apache License Version 2.0 can be found here.