amplab/tachyon — pull request #364 by dcapwell (2014-08-15 23:17:06+00:00)
Title: return immutable copy of children to avoid concurrent read and write

Running YCSB load adding in 1m elements.
Go to the UI and try to view the dir and you get the following back

```
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:926)
at java.util.HashMap$KeyIterator.next(HashMap.java:960)
at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1067)
at tachyon.master.MasterInfo.getFilesInfo(MasterInfo.java:1429)
at tachyon.web.WebInterfaceBrowseServlet.doGet(WebInterfaceBrowseServlet.java:197)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
```

This is caused by the fact that the lock you need to have on children is on the INodeFile. Rather than users locking on that object, when you call `getChildren`, return a immutable copy so user's don't have to worry about locking.