HDFS-3683. Edit log replay progress indicator shows >100% complete. Contributed by Plamen Jeliazkov.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1377368 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bf08346d3c
commit
6cac9aa7f9
@ -504,6 +504,9 @@ Release 2.0.1-alpha - UNRELEASED
|
|||||||
HDFS-3715. Fix TestFileCreation#testFileCreationNamenodeRestart.
|
HDFS-3715. Fix TestFileCreation#testFileCreationNamenodeRestart.
|
||||||
(Andrew Whang via eli)
|
(Andrew Whang via eli)
|
||||||
|
|
||||||
|
HDFS-3683. Edit log replay progress indicator shows >100% complete. (Plamen
|
||||||
|
Jeliazkov via atm)
|
||||||
|
|
||||||
BREAKDOWN OF HDFS-3042 SUBTASKS
|
BREAKDOWN OF HDFS-3042 SUBTASKS
|
||||||
|
|
||||||
HDFS-2185. HDFS portion of ZK-based FailoverController (todd)
|
HDFS-2185. HDFS portion of ZK-based FailoverController (todd)
|
||||||
|
@ -193,8 +193,9 @@ long loadEditRecords(EditLogInputStream in, boolean closeOnExit,
|
|||||||
if (op.hasTransactionId()) {
|
if (op.hasTransactionId()) {
|
||||||
long now = now();
|
long now = now();
|
||||||
if (now - lastLogTime > REPLAY_TRANSACTION_LOG_INTERVAL) {
|
if (now - lastLogTime > REPLAY_TRANSACTION_LOG_INTERVAL) {
|
||||||
int percent = Math.round((float)lastAppliedTxId / numTxns * 100);
|
long deltaTxId = lastAppliedTxId - expectedStartingTxId + 1;
|
||||||
LOG.info("replaying edit log: " + lastAppliedTxId + "/" + numTxns
|
int percent = Math.round((float) deltaTxId / numTxns * 100);
|
||||||
|
LOG.info("replaying edit log: " + deltaTxId + "/" + numTxns
|
||||||
+ " transactions completed. (" + percent + "%)");
|
+ " transactions completed. (" + percent + "%)");
|
||||||
lastLogTime = now;
|
lastLogTime = now;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user