Hi Aurélien Hébert,

Currently, Each InterpreterGroup has a AngularObjectRegistry [1].
InterpreterGroup is list of interpreter instances in the same group.

For example instance of SparkInterpreter and SparkSqlInterpreter will be in
the same InterpreterGroup object, but ShellInterpreter will not.

Therefore instance of each InterpreterGroup has their own
AngularObjectRegistry. That's why you can't get AngularObject created in
your interpreter from SparkInterpreter.

To share some data between different interpreters, please consider use
ResourcePool [2], which is also available from InterpreterContext.

Thanks,
moon

[1]
https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterGroup.java#L48
[2]
https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/resource/ResourcePool.java


On Fri, Mar 25, 2016 at 7:23 AM Aurélien Hébert <
aurelien.heb...@cityzendata.com> wrote:

> Hello,
>
> I am currently building an interpreter Zeppelin to request our own
> data-storage platform. I would like to store some variable and then use
> them with Spark.
>
> I implemented a way to store them in the angular registry. When I request
> them on zeppelin inside my own interpreter the registry contains them :
> (example:
> 2BFCR6CW3={1=AngularObject{noteId='2BFCR6CW3', paragraphId='null',
> c=AngularObject{noteId='2BFCR6CW3', paragraphId='null', object=APPLE,
> name='c'})
> I can then access them using my own interpreter or even sh (%sh echo -e
> "%angular Hello {{c}}").
>
> However, when I access to this registry via Scala, it doesn't contain any
> object with my current noteId. Is Scale using an other InterpreterContext ?
> Then how can we communicate with him, without a spark context ?
>
> Regards,
> ---
> Aurélien Hébert
> Developer at Cityzen Data
>

Reply via email to