Class InMemoryAssignmentBackend

  • All Implemented Interfaces:
    AutoCloseable, ILocalAssignmentsBackend

    public class InMemoryAssignmentBackend
    extends Object
    implements ILocalAssignmentsBackend
    An assignment backend which will keep all assignments and id-info in memory. Only used if no backend is specified internal.

    About thread safe: idToAssignment,idToName,nameToId are all memory cache in nimbus local, for

    • idToAssignment: nimbus will modify it and supervisors will sync it at fixed interval, so the assignments would come to eventual consistency.
    • idToName: storm submitting/killing is guarded by the same lock, a ConcurrentHashMap is ok.
    • nameToId: same as idToName.