Hadoop Common
  1. Hadoop Common
  2. HADOOP-5728

FSEditLog.printStatistics may cause IndexOutOfBoundsException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.19.1
    • Fix Version/s: 0.19.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      jdk 1.6, centOS 5.2 and hadoop 0.19.1

    • Hadoop Flags:
      Reviewed

      Description

      We met IndexOutOfBoundsException exception when did logSync or rollEditlog,
      the direct reason is the printStatistics of FSEditLog used the first element of
      StringArray editStreams, but does not check whether editStreams is empty when
      it is not null. As below:

      if (editStreams == null )

      { return; }

      .....[snipped]....
      buf.append(" Number of syncs: " + editStreams.get(0).getNumSync());

      the simple solution is to check whether it is empty.

        Activity

        Wang Xu created issue -
        Wang Xu made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Wang Xu made changes -
        Attachment editlog-printstatistics.patch [ 12406234 ]
        Johan Oskarsson made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Resolution Fixed [ 1 ]
        Owen O'Malley made changes -
        Component/s dfs [ 12310710 ]
        Tom White made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Wang Xu
            Reporter:
            Wang Xu
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.5h
              0.5h
              Remaining:
              Remaining Estimate - 0.5h
              0.5h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development