Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is intended to fix issue #119. With the introduction of the TaskAssignments refactor for creating unique task IDs (#106), I introduced a couple of bugs in the implementation of MesosSupervisor.getMetadata: 1. The slot counts in the Storm UI were broken -- the return from getMetadata was always a single element vector, due to using a Set instead of a java array previously. This was causing the PersistentVector.create(Object ... object) method to be matched, which just puts the passed objects into a vector without iterating over their constituent elements. Since we are passing a single Set object, we are getting a single element in the resultant vector. So the fix is to just create a List and pass that to PersistentVector.create(). 2. The returned Object must be serializable. Depending on the build and runtime environment, the serialization done by the storm supervisor during initialization will fail, crashing the supervisor. That was happening because we were passing back the ConcurrentHashMap$KeySetView object, which is not serializable. Here too, the fix is to just create a List and pass that to PersistentVector.create(). NOTE: I haven't been able to reproduce problem 2. unfortunately.
- Loading branch information