Hi moon, Sorry – I should’ve asked this before. How can I make use of “z.getInterpreterContext().getParagraphId()” in my own Scala code which I’m building outside of Zeppelin, please?
I’ve added this line to the scala file where I make the calls: import org.apache.zeppelin.spark.ZeppelinContext and I’ve added this line to my libraryDependencies in my sbt build file: "org.apache.zeppelin" % "zeppelin" % "0.5.0-incubating" but when I try to compile I get this error first: [error] …. object zeppelin is not a member of package org.apache [error] import org.apache.zeppelin.spark.ZeppelinContext [error] ^ When I look in my .ivy2 cache I see there are no jars under org.apache.zeppelin/zeppelin. Also, there are no jars on maven central at http://repo1.maven.org/maven2/org/apache/zeppelin/zeppelin/0.5.0-incubating/ either! Is this what would you expect, or do the binaries for that release need publishing to maven central please? Or should I build zeppelin-0.5.0-incubating locally instead? Many thanks, Lucas. From: Partridge, Lucas (GE Aviation) Sent: 13 October 2015 09:56 To: users@zeppelin.incubator.apache.org Subject: RE: How to find out if a user's Scala commands are executing in the same Zeppelin paragraph? Thanks moon; that’s exactly what I wanted☺. I confirm it works for me in standalone zeppelin-0.5.0-incubating. I get strings back with date/time stamps and a unique ID that differs between paragraphs. Thanks again, Lucas. From: moon soo Lee [mailto:m...@apache.org] Sent: 12 October 2015 17:17 To: users@zeppelin.incubator.apache.org<mailto:users@zeppelin.incubator.apache.org> Subject: Re: How to find out if a user's Scala commands are executing in the same Zeppelin paragraph? Hi Lucas, You can get current paragraph Id by calling %spark z.getInterpreterContext().getParagraphId() I'm not quite sure i understand your question correctly, but hope this helps. Thanks, moon On Mon, Oct 12, 2015 at 5:29 PM Partridge, Lucas (GE Aviation) <lucas.partri...@ge.com<mailto:lucas.partri...@ge.com>> wrote: Does anyone please know how to find out what paragraph your Scala code is running in at runtime? I’m using the standalone distribution of Zeppelin, zeppelin-0.5.0-incubating.tgz. I want to write some Scala code that does one thing if it’s being executed in the same paragraph as another call to my code, but another if it’s executing in a different paragraph to the other call. (Specifically I want to create a new figure or chart if it’s running in a new paragraph, or add to an existing figure if it’s running in the same paragraph.) Many thanks, Lucas.