Hi Denny,

interpreter.json saves informations not only properties for each
interpreter settings, but also binding of interpreter setting and each
notebooks. for instance,

"interpreterBindings": {
  "2AYGPYH6N": [
    "2AYSNKH1P",
    "2AXP4N64K",
    "2AXDCYDE9",
    "2AXF6Y261",
    "2AZDGUZ6J"
  ],
  ...
}

When paragraph is about to run, jobRun() method extracts interpreter name
from code of paragraph, and select appropriate one among interpreter
settings binded to current notebook [2].

Hope this helps.

Thanks,
moon

[1]
https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java#L233
[2]
https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java#L234


On Sat, May 28, 2016 at 3:00 AM Denny Wong <tecgi...@yahoo.com.invalid>
wrote:

> Hi Moon
>
> I see in the interpreter.json, each interpreter has an id associated.  Is
> this id used in anyway?  Does Zeppelin  use the name and group attributes
> only to figure out the interpreter to use for each paragraph?  When does
> Zeppelin figure out interpreter to use?  Each time when a paragraph is
> about to run?
> 2B5UBR2T1": {
>       "id": "2B5UBR2T1",
>       "name": "psql",
>       "group": "psql",
>       "properties": {
>         "postgresql.password": "",
>         "postgresql.driver.name": "org.postgresql.Driver",
>         "postgresql.max.result": "1000",
>         "postgresql.url": "jdbc:postgresql://localhost:5432/",
>         "postgresql.user": "gpadmin"
>
> Thanks
> Denny
>
> > On May 28, 2016, at 1:54 AM, moon soo Lee <leemoon...@gmail.com> wrote:
> >
> > Hi Denny,
> >
> > Binding information between interpreter and notebook is persisted in
> > 'conf/interpreter.json'. So normally, notebook will not have any problem
> > when imported to a different instance.
> >
> > The interpreter ids in 'angularObject' section is used for restoring
> > angularObject. So when a notebook which includes angularObject is
> imported
> > to a different instance, angularObject will be restored to front-end
> side,
> > but will not automatically restored to the backend (interpreter) side.
> Most
> > case, user will just need to run notebook to create angularObject in the
> > new instance.
> >
> > Thanks,
> > moon
> >
> > On Fri, May 27, 2016 at 8:29 PM denny wong <tecgi...@yahoo.com.invalid>
> > wrote:
> >
> >> If I export a notebook from one Zeppelin instance and import it to a
> >> different instance.  There are possibilities that the new instance may
> have
> >> different interpreter settings, so the interpreter ids may be different.
> >> How does Zeppelin resolve the id differences?  The interpreter ids seem
> >> embedded in the notebook json data.  If any of these ids don't match the
> >> interpreters in the new instance, what would happen?
> >> "angularObjects": {      "2BDFTKHGQ": [],      "2BB471VK2": [],
> >> "2BCJUYDVX": [],      "2BC45AGQM": [],      "2BCGRMV7H": [],
> >> "2BDGM8X1N": [],      "2BC7KXZAS": [],      "2BENDU4PZ": [],
> >> "2BD552SA5": [],      "2BDQVWF7N": [],      "2BBJTY1M2": [],
> >> "2BCKDVMGA": [],      "2BC1DGS1Y": [],      "2BD89FPEV": [],
> >> "2BBBNC5BZ": [],      "2BAX63HFB": [],      "2BE4DCPJG": []    },
> >> Thanks,
> >> Denny
>

Reply via email to