It's even worst than what I though, addAndNotifyRemoteProcess() is never
used in production code, only called by an unit test.

 The method Notebook.loadNoteFromRepo() just mention it in a comment:

          // at this point, remote interpreter process is not created.
          // so does not make sense add it to the remote.
          //
          // therefore instead of addAndNotifyRemoteProcess(), need to use
add()
          // that results add angularObject only in ZeppelinServer side not
remoteProcessSide

On Sat, Jan 23, 2016 at 9:14 PM, DuyHai Doan <[email protected]> wrote:

> Hello guys
>
>  While developing a new feature, I can see some inconsistencies in the
> design of the AngularObjecRegistry and RemoteAngularObjectRegistry classes.
>
>  The remote class extends the base AngularObjecRegistry class, so it also
> inherits the values HashMap.
>
>  The problem is that this value HashMap is JVM-local, therefore, there are
> some methods like addAndNotifyRemoteProcess()
> and removeAndNotifyRemoteProcess() to add/remove variables to/from the
> remote registry.
>
>  So far so good.
>
>  But then there is no method to read/check the presence of a variable from
> the remote registry. Calling get() only read the local HashMap ....
>
>  Ideally, the addAndNotifyRemoteProcess() should be renamed add() and
> override the add() method of the base AngularObjecRegistry class. Same idea
> for removeAndNotifyRemoteProcess() method. If we are dealing with a remote
> registry, that make senses that we do not use the JVM-local HashMap.
>
>  What do you think about the idea ? Is there any use-case where we DO need
> to access the local HashMap for a RemoteAngularObjectRegistry instance ?
>
> Remarks are welcomed
>
> Regards
>

Reply via email to