1. FSImage.setCheckpointTime() variable al is not used.
2. processIOError(ArrayList<StorageDirectory> sds) may be eliminated.
This will force using two-argument version of the function everywhere, in most cases with "true" value for the second argument.
3. I would also get rid of processIOError(ArrayList<EditLogOutputStream> errorStreams). The point is that it is better to have only one processIOError in each class, otherwise it can get as bad as it is now with all different variants of it. If you think it is a lot of changes, then lets at least make both of them private.
4. Do we want to make removedStorageDirs a map in order to avoid adding the same directory twice into it or does it never happen?
good idea. will need a separate JIRA for it
5. Same with Storage.storageDirs. If we search in a collection then we might want to use searchable collections. This may be done in a separate issue.
same as 4.
6. It's somewhat confusing: FSImage.processIOError() calls editLog.processIOError() and then FSEditLog.processIOError() calls fsimage.processIOError(). Is it going to converge at some point?
it should. every time processIOError calles its counterpart in the other class it passes false as second (propagate) argument to make sure it will not call the original function.
7. setCheckpointTime() ignores io errors. Just mentioning this, I don't see how to avoid it. Failed streams/directories will be remove next time flushAndSync() called.
Yes, it should be cought elsewhere.