HDFS-4569. Merge r1454233 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1454236 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2013-03-08 04:01:17 +00:00
parent 22cc69ee91
commit 4e38de7c95
4 changed files with 23 additions and 4 deletions

View File

@ -20,6 +20,9 @@ Release 2.0.5-beta - UNRELEASED
HDFS-4519. Support overriding jsvc binary and log file locations HDFS-4519. Support overriding jsvc binary and log file locations
when launching secure datanode. (Chris Nauroth via suresh) when launching secure datanode. (Chris Nauroth via suresh)
HDFS-4569. Small image transfer related cleanups.
(Andrew Wang via suresh)
OPTIMIZATIONS OPTIMIZATIONS
BUG FIXES BUG FIXES

View File

@ -361,7 +361,7 @@ public class DFSConfigKeys extends CommonConfigurationKeys {
// Image transfer timeout // Image transfer timeout
public static final String DFS_IMAGE_TRANSFER_TIMEOUT_KEY = "dfs.image.transfer.timeout"; public static final String DFS_IMAGE_TRANSFER_TIMEOUT_KEY = "dfs.image.transfer.timeout";
public static final int DFS_IMAGE_TRANSFER_TIMEOUT_DEFAULT = 60 * 1000; public static final int DFS_IMAGE_TRANSFER_TIMEOUT_DEFAULT = 10 * 60 * 1000;
//Keys with no defaults //Keys with no defaults
public static final String DFS_DATANODE_PLUGINS_KEY = "dfs.datanode.plugins"; public static final String DFS_DATANODE_PLUGINS_KEY = "dfs.datanode.plugins";

View File

@ -230,7 +230,6 @@ public static MD5Hash doGetUrl(URL url, List<File> localPaths,
SecurityUtil.openSecureHttpConnection(url); SecurityUtil.openSecureHttpConnection(url);
if (timeout <= 0) { if (timeout <= 0) {
// Set the ping interval as timeout
Configuration conf = new HdfsConfiguration(); Configuration conf = new HdfsConfiguration();
timeout = conf.getInt(DFSConfigKeys.DFS_IMAGE_TRANSFER_TIMEOUT_KEY, timeout = conf.getInt(DFSConfigKeys.DFS_IMAGE_TRANSFER_TIMEOUT_KEY,
DFSConfigKeys.DFS_IMAGE_TRANSFER_TIMEOUT_DEFAULT); DFSConfigKeys.DFS_IMAGE_TRANSFER_TIMEOUT_DEFAULT);

View File

@ -733,12 +733,29 @@
</description> </description>
</property> </property>
<property>
<name>dfs.image.transfer.timeout</name>
<value>600000</value>
<description>
Timeout for image transfer in milliseconds. This timeout and the related
dfs.image.transfer.bandwidthPerSec parameter should be configured such
that normal image transfer can complete within the timeout.
This timeout prevents client hangs when the sender fails during
image transfer, which is particularly important during checkpointing.
Note that this timeout applies to the entirety of image transfer, and
is not a socket timeout.
</description>
</property>
<property> <property>
<name>dfs.image.transfer.bandwidthPerSec</name> <name>dfs.image.transfer.bandwidthPerSec</name>
<value>0</value> <value>0</value>
<description> <description>
Specifies the maximum amount of bandwidth that can be utilized for image Maximum bandwidth used for image transfer in bytes per second.
transfer in term of the number of bytes per second. This can help keep normal namenode operations responsive during
checkpointing. The maximum bandwidth and timeout in
dfs.image.transfer.timeout should be set such that normal image
transfers can complete successfully.
A default value of 0 indicates that throttling is disabled. A default value of 0 indicates that throttling is disabled.
</description> </description>
</property> </property>