MAPREDUCE-7250. FrameworkUploader skip replication check if timeout is 0.
Contributed by Peter Bacsko.
This commit is contained in:
parent
304e75a48b
commit
da9aa9c909
|
@ -298,6 +298,9 @@ public class FrameworkUploader implements Runnable {
|
||||||
fileSystem.setReplication(targetPath, finalReplication);
|
fileSystem.setReplication(targetPath, finalReplication);
|
||||||
LOG.info("Set replication to " +
|
LOG.info("Set replication to " +
|
||||||
finalReplication + " for path: " + targetPath);
|
finalReplication + " for path: " + targetPath);
|
||||||
|
if (timeout == 0) {
|
||||||
|
LOG.info("Timeout is set to 0. Skipping replication check.");
|
||||||
|
} else {
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
long endTime = startTime;
|
long endTime = startTime;
|
||||||
long currentReplication = 0;
|
long currentReplication = 0;
|
||||||
|
@ -313,6 +316,7 @@ public class FrameworkUploader implements Runnable {
|
||||||
" replication of %d (current replication is %d)",
|
" replication of %d (current replication is %d)",
|
||||||
timeout, acceptableReplication, currentReplication));
|
timeout, acceptableReplication, currentReplication));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG.info("Cannot set replication to " +
|
LOG.info("Cannot set replication to " +
|
||||||
finalReplication + " for path: " + targetPath +
|
finalReplication + " for path: " + targetPath +
|
||||||
|
|
Loading…
Reference in New Issue