You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by pr...@apache.org on 2019/12/05 07:01:42 UTC
[hadoop] branch trunk updated: Revert "MAPREDUCE-7250.
FrameworkUploader skip replication check if timeout is 0."
This is an automated email from the ASF dual-hosted git repository.
prabhujoseph pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 304e75a Revert "MAPREDUCE-7250. FrameworkUploader skip replication check if timeout is 0."
304e75a is described below
commit 304e75a48b727f702a9ede8501af01cf9c0585d3
Author: prabhujoseph <pj...@cloudera.com>
AuthorDate: Thu Dec 5 12:31:13 2019 +0530
Revert "MAPREDUCE-7250. FrameworkUploader skip replication check if timeout is 0."
This reverts commit 8d82c441029522f447df1ab2b6d770ca15653207.
---
.../hadoop/mapred/uploader/FrameworkUploader.java | 32 ++++++++++------------
1 file changed, 14 insertions(+), 18 deletions(-)
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-uploader/src/main/java/org/apache/hadoop/mapred/uploader/FrameworkUploader.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-uploader/src/main/java/org/apache/hadoop/mapred/uploader/FrameworkUploader.java
index 3dea023..6f914f7 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-uploader/src/main/java/org/apache/hadoop/mapred/uploader/FrameworkUploader.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-uploader/src/main/java/org/apache/hadoop/mapred/uploader/FrameworkUploader.java
@@ -298,24 +298,20 @@ public class FrameworkUploader implements Runnable {
fileSystem.setReplication(targetPath, finalReplication);
LOG.info("Set replication to " +
finalReplication + " for path: " + targetPath);
- if (timeout == 0) {
- LOG.info("Timeout is set to 0. Skipping replication check.");
- } else {
- long startTime = System.currentTimeMillis();
- long endTime = startTime;
- long currentReplication = 0;
- while(endTime - startTime < timeout * 1000 &&
- currentReplication < acceptableReplication) {
- Thread.sleep(1000);
- endTime = System.currentTimeMillis();
- currentReplication = getSmallestReplicatedBlockCount();
- }
- if (endTime - startTime >= timeout * 1000) {
- LOG.error(String.format(
- "Timed out after %d seconds while waiting for acceptable" +
- " replication of %d (current replication is %d)",
- timeout, acceptableReplication, currentReplication));
- }
+ long startTime = System.currentTimeMillis();
+ long endTime = startTime;
+ long currentReplication = 0;
+ while(endTime - startTime < timeout * 1000 &&
+ currentReplication < acceptableReplication) {
+ Thread.sleep(1000);
+ endTime = System.currentTimeMillis();
+ currentReplication = getSmallestReplicatedBlockCount();
+ }
+ if (endTime - startTime >= timeout * 1000) {
+ LOG.error(String.format(
+ "Timed out after %d seconds while waiting for acceptable" +
+ " replication of %d (current replication is %d)",
+ timeout, acceptableReplication, currentReplication));
}
} else {
LOG.info("Cannot set replication to " +
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org