You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Jagadish (JIRA)" <ji...@apache.org> on 2016/03/17 08:44:33 UTC

[jira] [Created] (SAMZA-899) Re-design the JobModel class

Jagadish created SAMZA-899:
------------------------------

             Summary: Re-design the JobModel class
                 Key: SAMZA-899
                 URL: https://issues.apache.org/jira/browse/SAMZA-899
             Project: Samza
          Issue Type: Bug
            Reporter: Jagadish


The current design of the JobModel class takes in a LocalityManager instance. The JobModel class also populates and mutates the container host mappings by reading from the LocalityManager. This state in the class is also mutated by the methods that make a call to populateContainerToHost mappings.

Mutation of this state must be done external to the JobModel class. The JobModel class should *not* know who its LocalityManager is. The JobModel class must merely take in a *final* container-host mapping as a part of its constructor.

This re-design will ensure that the JobModel will be immutable and merely expose getters.

The JobModel class is shared from multiple threads, hence it's dangerous to   expose methods that mutate state without proper synchronization.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)