you can use zeppelin scheduler to execute it every few seconds assuming that zeppelin has sufficient to execute every instance of the code
Dr Mich Talebzadeh LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw <https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>* http://talebzadehmich.wordpress.com *Disclaimer:* Use it at your own risk. Any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on this email's technical content is explicitly disclaimed. The author will in no case be liable for any monetary damages arising from such loss, damage or destruction. On 23 February 2017 at 05:19, Jagat Singh <jagatsi...@gmail.com> wrote: > You might want to see this > > https://gist.github.com/granturing/a09aed4a302a7367be92 > > On 23 February 2017 at 16:07, Jongyoul Lee <jongy...@gmail.com> wrote: > >> It's interesting. :-) >> >> On Thu, Feb 23, 2017 at 11:52 AM, Chaoran Yu <yuchaoran2...@gmail.com> >> wrote: >> >>> Hello guys, >>> >>> I'm working on visualization based on Zeppelin that displays data >>> coming from Kafka. I'm wondering if it's possible to make my plots update >>> in real time as data keep coming in from Kafka. >>> >>> For example, consider a simple program shown below: >>> >>> >>> %spark >>> import _root_.kafka.serializer.DefaultDecoder >>> import _root_.kafka.serializer.StringDecoder >>> import org.apache.spark.streaming.kafka.KafkaUtils >>> import org.apache.spark.storage.StorageLevel >>> import org.apache.spark.streaming._ >>> >>> val ssc = new StreamingContext(sc, Seconds(2)) >>> >>> val lines = KafkaUtils.createStream(ssc, zkQuorum, groupId, >>> Map("test-topic" -> 1)) >>> val words = lines.map(x => x._1 + x._2) >>> words.print() >>> >>> ssc.start() >>> >>> >>> When I execute the Zeppelin cell containing the above code, it would >>> only print out contents of words variable once and never update it again. >>> I have to re-execute the cell to see an update. How do I make words >>> update automatically so that I can use it later to generate plots that >>> update automatically as well? >>> >>> >>> Thank you, >>> >>> -- >>> Chaoran Yu >>> University of California at Berkeley | May 2014 >>> B.S. Computer Science and Engineering >>> Phone: (510) 542-7749 >>> >> >> >> >> -- >> 이종열, Jongyoul Lee, 李宗烈 >> http://madeng.net >> > >