Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-3683

Edit log replay progress indicator shows >100% complete

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.0.2-alpha
    • Component/s: namenode
    • Labels:
      None

      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%)

      1. HDFS_3683.patch
        1.0 kB
        Plamen Jeliazkov
      2. HDFS_3683.patch
        1 kB
        Plamen Jeliazkov
      3. HDFS_3683.patch
        1 kB
        Plamen Jeliazkov

        Activity

          People

          • Assignee:
            Plamen Jeliazkov
            Reporter:
            Todd Lipcon
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development