You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by shroffpradyumn <sh...@berkeley.edu> on 2015/04/12 01:54:20 UTC
Integrating D3 with Spark
I'm working on adding a data-graph to the Spark jobs page (rendered by
stagePage.scala) to help users analyze the different job phases visually.
I've already made a mockup using "dummy data" and D3.js but I'm having some
difficulties integrating my JavaScript code with the Scala code of Spark.
Essentially, I'm not sure on how I can access the validTasks variable in
stagePage.scala from within my Javascript code such that I can use it along
with D3.js to render the data-graph.
Any help would be greatly appreciated!
--
View this message in context: http://apache-spark-developers-list.1001551.n3.nabble.com/Integrating-D3-with-Spark-tp11544.html
Sent from the Apache Spark Developers List mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
For additional commands, e-mail: dev-help@spark.apache.org
R: Integrating D3 with Spark
Posted by Paolo Platter <pa...@agilelab.it>.
Hi,
I integrated charts on spark-notebook, very similar task. In order to reduce D3 boiler plate I suggest to use dimple.js.
It provides out of the box d3 based charts.
Bye
Paolo
Inviata dal mio Windows Phone
________________________________
Da: anshu shukla<ma...@gmail.com>
Inviato: 13/04/2015 05:50
A: Kay Ousterhout<ma...@gmail.com>
Cc: shroffpradyumn<ma...@berkeley.edu>; dev@spark.apache.org<ma...@spark.apache.org>
Oggetto: Re: Integrating D3 with Spark
Hey Ousterhout ,
I found its amazing .Before this i used to use my own D3.js files that
subscribes to the redis pub-shub database where output tuples are
being published to the DB . So it was already including latency to push
data to redis ,although it was very less.
Once again thanks .
On Sun, Apr 12, 2015 at 10:06 PM, Kay Ousterhout <ka...@gmail.com>
wrote:
> Hi Pradyumn,
>
> Take a look at this pull request, which does something similar:
> https://github.com/apache/spark/pull/2342/files
>
> You can put JavaScript in <script> tags in Scala. That code takes a nice
> approach of putting most of the JavaScript in a new file, and then just
> calling into it from the HTML generated by the Scala files.
>
> -Kay
>
> > On Apr 11, 2015, at 4:54 PM, shroffpradyumn <sh...@berkeley.edu>
> wrote:
> >
> > I'm working on adding a data-graph to the Spark jobs page (rendered by
> > stagePage.scala) to help users analyze the different job phases visually.
> >
> > I've already made a mockup using "dummy data" and D3.js but I'm having
> some
> > difficulties integrating my JavaScript code with the Scala code of Spark.
> > Essentially, I'm not sure on how I can access the validTasks variable in
> > stagePage.scala from within my Javascript code such that I can use it
> along
> > with D3.js to render the data-graph.
> >
> > Any help would be greatly appreciated!
> >
> >
> >
> > --
> > View this message in context:
> http://apache-spark-developers-list.1001551.n3.nabble.com/Integrating-D3-with-Spark-tp11544.html
> > Sent from the Apache Spark Developers List mailing list archive at
> Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
> > For additional commands, e-mail: dev-help@spark.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
> For additional commands, e-mail: dev-help@spark.apache.org
>
>
--
Thanks & Regards,
Anshu Shukla
Re: Integrating D3 with Spark
Posted by anshu shukla <an...@gmail.com>.
Hey Ousterhout ,
I found its amazing .Before this i used to use my own D3.js files that
subscribes to the redis pub-shub database where output tuples are
being published to the DB . So it was already including latency to push
data to redis ,although it was very less.
Once again thanks .
On Sun, Apr 12, 2015 at 10:06 PM, Kay Ousterhout <ka...@gmail.com>
wrote:
> Hi Pradyumn,
>
> Take a look at this pull request, which does something similar:
> https://github.com/apache/spark/pull/2342/files
>
> You can put JavaScript in <script> tags in Scala. That code takes a nice
> approach of putting most of the JavaScript in a new file, and then just
> calling into it from the HTML generated by the Scala files.
>
> -Kay
>
> > On Apr 11, 2015, at 4:54 PM, shroffpradyumn <sh...@berkeley.edu>
> wrote:
> >
> > I'm working on adding a data-graph to the Spark jobs page (rendered by
> > stagePage.scala) to help users analyze the different job phases visually.
> >
> > I've already made a mockup using "dummy data" and D3.js but I'm having
> some
> > difficulties integrating my JavaScript code with the Scala code of Spark.
> > Essentially, I'm not sure on how I can access the validTasks variable in
> > stagePage.scala from within my Javascript code such that I can use it
> along
> > with D3.js to render the data-graph.
> >
> > Any help would be greatly appreciated!
> >
> >
> >
> > --
> > View this message in context:
> http://apache-spark-developers-list.1001551.n3.nabble.com/Integrating-D3-with-Spark-tp11544.html
> > Sent from the Apache Spark Developers List mailing list archive at
> Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
> > For additional commands, e-mail: dev-help@spark.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
> For additional commands, e-mail: dev-help@spark.apache.org
>
>
--
Thanks & Regards,
Anshu Shukla
Re: Integrating D3 with Spark
Posted by Kay Ousterhout <ka...@gmail.com>.
Hi Pradyumn,
Take a look at this pull request, which does something similar: https://github.com/apache/spark/pull/2342/files
You can put JavaScript in <script> tags in Scala. That code takes a nice approach of putting most of the JavaScript in a new file, and then just calling into it from the HTML generated by the Scala files.
-Kay
> On Apr 11, 2015, at 4:54 PM, shroffpradyumn <sh...@berkeley.edu> wrote:
>
> I'm working on adding a data-graph to the Spark jobs page (rendered by
> stagePage.scala) to help users analyze the different job phases visually.
>
> I've already made a mockup using "dummy data" and D3.js but I'm having some
> difficulties integrating my JavaScript code with the Scala code of Spark.
> Essentially, I'm not sure on how I can access the validTasks variable in
> stagePage.scala from within my Javascript code such that I can use it along
> with D3.js to render the data-graph.
>
> Any help would be greatly appreciated!
>
>
>
> --
> View this message in context: http://apache-spark-developers-list.1001551.n3.nabble.com/Integrating-D3-with-Spark-tp11544.html
> Sent from the Apache Spark Developers List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
> For additional commands, e-mail: dev-help@spark.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
For additional commands, e-mail: dev-help@spark.apache.org