Issue Details (XML | Word | Printable)

Key: HADOOP-5728
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Wang Xu
Reporter: Wang Xu
Votes: 0
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

FSEditLog.printStatistics may cause IndexOutOfBoundsException

Created: 23/Apr/09 01:50 PM   Updated: 03/Aug/09 12:59 PM
Return to search
Component/s: None
Affects Version/s: 0.19.1
Fix Version/s: 0.19.2

Time Tracking:
Original Estimate: 0.5h
Original Estimate - 0.5h
Remaining Estimate: 0.5h
Remaining Estimate - 0.5h
Time Spent: Not Specified
Remaining Estimate - 0.5h

File Attachments:
  Size
Text File Licensed for inclusion in ASF works editlog-printstatistics.patch 2009-04-23 01:53 PM Wang Xu 0.5 kB
Environment: jdk 1.6, centOS 5.2 and hadoop 0.19.1

Hadoop Flags: Reviewed
Resolution Date: 22/May/09 04:17 PM


 Description  « Hide
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.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Wang Xu made changes - 23/Apr/09 01:51 PM
Field Original Value New Value
Status Open [ 1 ] Patch Available [ 10002 ]
Wang Xu made changes - 23/Apr/09 01:53 PM
Attachment editlog-printstatistics.patch [ 12406234 ]
Johan Oskarsson made changes - 22/May/09 04:17 PM
Resolution Fixed [ 1 ]
Hadoop Flags [Reviewed]
Status Patch Available [ 10002 ] Resolved [ 5 ]
Owen O'Malley made changes - 08/Jul/09 04:43 PM
Component/s dfs [ 12310710 ]
Tom White made changes - 03/Aug/09 12:59 PM
Status Resolved [ 5 ] Closed [ 6 ]