Re: Running Javascript from scala spark

2015-05-26 Thread marcos rebelo
Hi Ayan, I'm not an expert on Spark or on the use of dynamic languages on the JVM. I started yesterday doing a proof of concept for a project. The idea is: - to get some datasets in CSV format (I steel need to check what is the better way to parse a CSV in spark. Any suggestion?) - work this d

Re: Running Javascript from scala spark

2015-05-26 Thread ayan guha
Yes you are in right mailing list, for sure :) Regarding your question, I am sure you are well versed with how spark works. Essentially you can run any arbitrary function with map call and it will run in remote nodes. Hence you need to install any needed dependency in all nodes. You can also pass

Re: Running Javascript from scala spark

2015-05-26 Thread andy petrella
Yop, why not using like you said a js engine le rhino? But then I would suggest using mapPartition instead si only one engine per partition. Probably broadcasting the script is also a good thing to do. I guess it's for add hoc transformations passed by a remote client, otherwise you could simply c

Re: Running Javascript from scala spark

2015-05-26 Thread marcos rebelo
Hi all Let me be clear, I'm speaking of Spark (big data, map/reduce, hadoop, ... related). I have multiple map/flatMap/groupBy and one of the steps needs to be a map passing the item inside a JavaScript code. 2 Questions: - Is this question related to this list? - Did someone do something simil

Re: Running Javascript from scala spark

2015-05-26 Thread Marcelo Vanzin
Is it just me or does that look completely unrelated to Spark-the-Apache-project? On Tue, May 26, 2015 at 10:55 AM, Ted Yu wrote: > Have you looked at https://github.com/spark/sparkjs ? > > Cheers > > On Tue, May 26, 2015 at 10:17 AM, marcos rebelo wrote: > >> Hi all, >> >> My first message on

Re: Running Javascript from scala spark

2015-05-26 Thread Ted Yu
Have you looked at https://github.com/spark/sparkjs ? Cheers On Tue, May 26, 2015 at 10:17 AM, marcos rebelo wrote: > Hi all, > > My first message on this mailing list: > > I need to run JavaScript on Spark. Somehow I would like to use the > ScriptEngineManager or any other way that makes Rhino

Running Javascript from scala spark

2015-05-26 Thread marcos rebelo
Hi all, My first message on this mailing list: I need to run JavaScript on Spark. Somehow I would like to use the ScriptEngineManager or any other way that makes Rhino do the work for me. Consider that I have a Structure that needs to be changed by a JavaScript. I will have a set of Javascript a