Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.0-alpha
-
None
-
Reviewed
Description
When loading a large edit log, the NameNode prints a percentage-complete progress indicator:
int percent = Math.round((float)lastAppliedTxId / numTxns * 100); LOG.info("replaying edit log: " + lastAppliedTxId + "/" + numTxns + " transactions completed. (" + percent + "%)");
But the percentage is calculated incorrectly, since it divides the transaction ID by the number of expected transactions. This only works when starting at txid 1. (eg if we are loading 1000 transaction starting at txid 1000, the indicator will start at 100% and go to 200%)