Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-16063

Add toString to EditLogFileInputStream

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • namanode
    • Reviewed

    Description

      The class EditLogFileInputStream is logged at DEBUG level, but has no toString method, so the logging is of limited value. Also, put the DEBUG statement behind some guards since it's printing an unbounded list of items.

      https://github.com/apache/hadoop/blob/eefa664fea1119a9c6e3ae2d2ad3069019fbd4ef/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java#L895

      Just need the following:

        private final LogSource log;
        private final long firstTxId;
        private final long lastTxId;
        private final boolean isInProgress;
        private int maxOpSize;
        private State state = State.UNINIT;
        private int logVersion = 0;
      

      Attachments

        1. HDFS-16063.001.patch
          1 kB
          Dionisii Iuzhakov

        Activity

          People

            bahus Dionisii Iuzhakov
            belugabehr David Mollitor
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: