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

          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