You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by "Balachandar R.A." <ba...@gmail.com> on 2016/03/17 10:55:53 UTC
use of z.run
Hello
Can we use z.run() to run a set of paragraphs? In my notebook, I have spark
and angular paragraphs and I would fire running of, lets say, 5 paragraphs,
preferably, simultaneously. These paragraphs launch various visualization
widgets (bar charts, leaflet map, and cytoscape network graphs). So,
paragraph A creates a necessary data structures from which these
visualizations can be created, and run all the other paragraphs. Please let
me know how can I achieve this?
regards
Bala
Re: use of z.run
Posted by Corneau Damien <co...@gmail.com>.
@tog:
Recently the paragraph id was added at the top of the paragraph setting
dropdown, to make it easy to retrieve and copy paste.
(If that helps :) )
On Fri, Mar 18, 2016 at 6:38 AM, moon soo Lee <mo...@apache.org> wrote:
> Hi,
>
> I think that's something you need to implement inside of notebook at the
> moment.
> Do you think it's a general requirement?
>
> Thanks,
> moon
>
> On Thu, Mar 17, 2016 at 2:12 PM tog <gu...@gmail.com> wrote:
>
>> Hi
>>
>> In a scénario for which I would not know which paragraph to refresh
>> (run), would there be a way to register paragraphs to be refreshed and then
>> trigger a refresh for all of them.
>>
>> May be I need to implement that? Or would that be a generic requirement
>>
>> Cheers
>>
>>
>> On Thursday, 17 March 2016, moon soo Lee <mo...@apache.org> wrote:
>>
>>> Hi Bala,
>>>
>>> z.run() accept both integer index of paragraph (starts from 0) [1] or
>>> paragraph id [2].
>>>
>>> So you can do something like
>>>
>>> %spark
>>> (2 to 5).foreach{ idx => z.run(idx) }
>>>
>>> or
>>>
>>> %spark
>>> import collection.JavaConversions._
>>> z.listParagraphs.foreach(paragraphId=> z.run(paragraphId))
>>>
>>> Hope this helps.
>>>
>>> Thanks,
>>> moon
>>>
>>> [1]
>>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L398
>>> [2]
>>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L370
>>>
>>>
>>>
>>> On Thu, Mar 17, 2016 at 2:55 AM Balachandar R.A. <
>>> balachandar.ra@gmail.com> wrote:
>>>
>>>> Hello
>>>>
>>>> Can we use z.run() to run a set of paragraphs? In my notebook, I have
>>>> spark and angular paragraphs and I would fire running of, lets say, 5
>>>> paragraphs, preferably, simultaneously. These paragraphs launch various
>>>> visualization widgets (bar charts, leaflet map, and cytoscape network
>>>> graphs). So, paragraph A creates a necessary data structures from which
>>>> these visualizations can be created, and run all the other paragraphs.
>>>> Please let me know how can I achieve this?
>>>>
>>>> regards
>>>> Bala
>>>>
>>>
>>
>> --
>> PGP KeyID: 2048R/EA31CFC9 subkeys.pgp.net
>>
>
Re: use of z.run
Posted by moon soo Lee <mo...@apache.org>.
Hi,
I think that's something you need to implement inside of notebook at the
moment.
Do you think it's a general requirement?
Thanks,
moon
On Thu, Mar 17, 2016 at 2:12 PM tog <gu...@gmail.com> wrote:
> Hi
>
> In a scénario for which I would not know which paragraph to refresh (run),
> would there be a way to register paragraphs to be refreshed and then
> trigger a refresh for all of them.
>
> May be I need to implement that? Or would that be a generic requirement
>
> Cheers
>
>
> On Thursday, 17 March 2016, moon soo Lee <mo...@apache.org> wrote:
>
>> Hi Bala,
>>
>> z.run() accept both integer index of paragraph (starts from 0) [1] or
>> paragraph id [2].
>>
>> So you can do something like
>>
>> %spark
>> (2 to 5).foreach{ idx => z.run(idx) }
>>
>> or
>>
>> %spark
>> import collection.JavaConversions._
>> z.listParagraphs.foreach(paragraphId=> z.run(paragraphId))
>>
>> Hope this helps.
>>
>> Thanks,
>> moon
>>
>> [1]
>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L398
>> [2]
>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L370
>>
>>
>>
>> On Thu, Mar 17, 2016 at 2:55 AM Balachandar R.A. <
>> balachandar.ra@gmail.com> wrote:
>>
>>> Hello
>>>
>>> Can we use z.run() to run a set of paragraphs? In my notebook, I have
>>> spark and angular paragraphs and I would fire running of, lets say, 5
>>> paragraphs, preferably, simultaneously. These paragraphs launch various
>>> visualization widgets (bar charts, leaflet map, and cytoscape network
>>> graphs). So, paragraph A creates a necessary data structures from which
>>> these visualizations can be created, and run all the other paragraphs.
>>> Please let me know how can I achieve this?
>>>
>>> regards
>>> Bala
>>>
>>
>
> --
> PGP KeyID: 2048R/EA31CFC9 subkeys.pgp.net
>
Re: use of z.run
Posted by tog <gu...@gmail.com>.
Hi
In a scénario for which I would not know which paragraph to refresh (run),
would there be a way to register paragraphs to be refreshed and then
trigger a refresh for all of them.
May be I need to implement that? Or would that be a generic requirement
Cheers
On Thursday, 17 March 2016, moon soo Lee <mo...@apache.org> wrote:
> Hi Bala,
>
> z.run() accept both integer index of paragraph (starts from 0) [1] or
> paragraph id [2].
>
> So you can do something like
>
> %spark
> (2 to 5).foreach{ idx => z.run(idx) }
>
> or
>
> %spark
> import collection.JavaConversions._
> z.listParagraphs.foreach(paragraphId=> z.run(paragraphId))
>
> Hope this helps.
>
> Thanks,
> moon
>
> [1]
> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L398
> [2]
> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L370
>
>
>
> On Thu, Mar 17, 2016 at 2:55 AM Balachandar R.A. <balachandar.ra@gmail.com
> <javascript:_e(%7B%7D,'cvml','balachandar.ra@gmail.com');>> wrote:
>
>> Hello
>>
>> Can we use z.run() to run a set of paragraphs? In my notebook, I have
>> spark and angular paragraphs and I would fire running of, lets say, 5
>> paragraphs, preferably, simultaneously. These paragraphs launch various
>> visualization widgets (bar charts, leaflet map, and cytoscape network
>> graphs). So, paragraph A creates a necessary data structures from which
>> these visualizations can be created, and run all the other paragraphs.
>> Please let me know how can I achieve this?
>>
>> regards
>> Bala
>>
>
--
PGP KeyID: 2048R/EA31CFC9 subkeys.pgp.net
Re: use of z.run
Posted by "Balachandar R.A." <ba...@gmail.com>.
Hi moon,
Little more information I would like to share regarding the issue
The para 7 in my notebook will render a bar chart. The scope.routeSelected
variable will be modified somewhere in the code. Now, I have modified the
code a bit so that the variable is incremented on selecting a bar from the
bar chart. This time, para 8 is run successfully. I suspect, the angular
watch works on some kind of mouse click?
regards
Bala
On 18 March 2016 at 23:18, Balachandar R.A. <ba...@gmail.com>
wrote:
> Hi moon,
>
> Tried your hint with no luck :-( Thanks anyway
>
>
> regards
> Bala
>
> On 18 March 2016 at 22:26, moon soo Lee <mo...@apache.org> wrote:
>
>> Hi,
>>
>> Could you try pass context to z.run() ?
>>
>> z.angularWatch("routeSelected", (before, after, context) => {
>> z.run(8, context)
>> }
>>
>> Thanks,
>> moon
>>
>> On Fri, Mar 18, 2016 at 4:22 AM Balachandar R.A. <
>> balachandar.ra@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> Thanks for discussing this issue. Yes, I would like to run a angular
>>> paragraph from another angular paragraph. Now, I have explored a bit about
>>> angularWatch and looked very promising. I have more or less achieved what I
>>> wanted to. But still it is not 100%.
>>>
>>> I have this piece of code in one of my spark paragraph. This is para 6.
>>>
>>>
>>>
>>>
>>> .....
>>>
>>> z.angularBind("routeSelected", 0);
>>>
>>> z.angularUnwatch("routeSelected");
>>>
>>> z.angularWatch("routeSelected", (before, after) => {
>>>
>>> // trigger re-rendering of cytoscape graphs
>>>
>>> z.run(8) // re-render cytoscape density graph
>>>
>>> }
>>>
>>> )
>>>
>>> .....
>>>
>>> ......
>>>
>>>
>>>
>>> The routeSelected variable will be modified by para 7 which is angular
>>> based using the below code
>>>
>>> ...
>>>
>>> scope.routeSelected = scope.routeSelected + 1
>>>
>>> ....
>>>
>>>
>>>
>>>
>>>
>>> Since the variable routeSelected is under watch, I expected para 8 will
>>> run. But, the para 8 did not run automatically. To my surprise, it is run
>>> when I click anywhere in the para 8, 7 6. It is very strange. Any clue
>>> about this behavior?
>>>
>>>
>>>
>>> regards
>>>
>>> Bala
>>>
>>>
>>>
>>> On 18 March 2016 at 10:40, Corneau Damien <co...@gmail.com> wrote:
>>>
>>>> Do you need to run a paragraph from the %angular paragraph?
>>>> From what you described before, you wanted to do z.run() from spark.
>>>>
>>>> If you need to run from %angular, you can try this PR:
>>>> https://github.com/apache/incubator-zeppelin/pull/742
>>>>
>>>> On Fri, Mar 18, 2016 at 1:55 PM, Balachandar R.A. <
>>>> balachandar.ra@gmail.com> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> Thanks for the hint. But z.run() is not working inside %angular
>>>>> paragraph in my notebook. Any idea?
>>>>>
>>>>> Regards
>>>>> Bala
>>>>> On 17-Mar-2016 11:39 pm, "moon soo Lee" <mo...@apache.org> wrote:
>>>>>
>>>>>> Hi Bala,
>>>>>>
>>>>>> z.run() accept both integer index of paragraph (starts from 0) [1] or
>>>>>> paragraph id [2].
>>>>>>
>>>>>> So you can do something like
>>>>>>
>>>>>> %spark
>>>>>> (2 to 5).foreach{ idx => z.run(idx) }
>>>>>>
>>>>>> or
>>>>>>
>>>>>> %spark
>>>>>> import collection.JavaConversions._
>>>>>> z.listParagraphs.foreach(paragraphId=> z.run(paragraphId))
>>>>>>
>>>>>> Hope this helps.
>>>>>>
>>>>>> Thanks,
>>>>>> moon
>>>>>>
>>>>>> [1]
>>>>>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L398
>>>>>> [2]
>>>>>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L370
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Mar 17, 2016 at 2:55 AM Balachandar R.A. <
>>>>>> balachandar.ra@gmail.com> wrote:
>>>>>>
>>>>>>> Hello
>>>>>>>
>>>>>>> Can we use z.run() to run a set of paragraphs? In my notebook, I
>>>>>>> have spark and angular paragraphs and I would fire running of, lets say, 5
>>>>>>> paragraphs, preferably, simultaneously. These paragraphs launch various
>>>>>>> visualization widgets (bar charts, leaflet map, and cytoscape network
>>>>>>> graphs). So, paragraph A creates a necessary data structures from which
>>>>>>> these visualizations can be created, and run all the other paragraphs.
>>>>>>> Please let me know how can I achieve this?
>>>>>>>
>>>>>>> regards
>>>>>>> Bala
>>>>>>>
>>>>>>
>>>>
>>>
>
Re: use of z.run
Posted by "Balachandar R.A." <ba...@gmail.com>.
Hi moon,
Tried your hint with no luck :-( Thanks anyway
regards
Bala
On 18 March 2016 at 22:26, moon soo Lee <mo...@apache.org> wrote:
> Hi,
>
> Could you try pass context to z.run() ?
>
> z.angularWatch("routeSelected", (before, after, context) => {
> z.run(8, context)
> }
>
> Thanks,
> moon
>
> On Fri, Mar 18, 2016 at 4:22 AM Balachandar R.A. <ba...@gmail.com>
> wrote:
>
>> Hello,
>>
>> Thanks for discussing this issue. Yes, I would like to run a angular
>> paragraph from another angular paragraph. Now, I have explored a bit about
>> angularWatch and looked very promising. I have more or less achieved what I
>> wanted to. But still it is not 100%.
>>
>> I have this piece of code in one of my spark paragraph. This is para 6.
>>
>>
>>
>>
>> .....
>>
>> z.angularBind("routeSelected", 0);
>>
>> z.angularUnwatch("routeSelected");
>>
>> z.angularWatch("routeSelected", (before, after) => {
>>
>> // trigger re-rendering of cytoscape graphs
>>
>> z.run(8) // re-render cytoscape density graph
>>
>> }
>>
>> )
>>
>> .....
>>
>> ......
>>
>>
>>
>> The routeSelected variable will be modified by para 7 which is angular
>> based using the below code
>>
>> ...
>>
>> scope.routeSelected = scope.routeSelected + 1
>>
>> ....
>>
>>
>>
>>
>>
>> Since the variable routeSelected is under watch, I expected para 8 will
>> run. But, the para 8 did not run automatically. To my surprise, it is run
>> when I click anywhere in the para 8, 7 6. It is very strange. Any clue
>> about this behavior?
>>
>>
>>
>> regards
>>
>> Bala
>>
>>
>>
>> On 18 March 2016 at 10:40, Corneau Damien <co...@gmail.com> wrote:
>>
>>> Do you need to run a paragraph from the %angular paragraph?
>>> From what you described before, you wanted to do z.run() from spark.
>>>
>>> If you need to run from %angular, you can try this PR:
>>> https://github.com/apache/incubator-zeppelin/pull/742
>>>
>>> On Fri, Mar 18, 2016 at 1:55 PM, Balachandar R.A. <
>>> balachandar.ra@gmail.com> wrote:
>>>
>>>> Hi
>>>>
>>>> Thanks for the hint. But z.run() is not working inside %angular
>>>> paragraph in my notebook. Any idea?
>>>>
>>>> Regards
>>>> Bala
>>>> On 17-Mar-2016 11:39 pm, "moon soo Lee" <mo...@apache.org> wrote:
>>>>
>>>>> Hi Bala,
>>>>>
>>>>> z.run() accept both integer index of paragraph (starts from 0) [1] or
>>>>> paragraph id [2].
>>>>>
>>>>> So you can do something like
>>>>>
>>>>> %spark
>>>>> (2 to 5).foreach{ idx => z.run(idx) }
>>>>>
>>>>> or
>>>>>
>>>>> %spark
>>>>> import collection.JavaConversions._
>>>>> z.listParagraphs.foreach(paragraphId=> z.run(paragraphId))
>>>>>
>>>>> Hope this helps.
>>>>>
>>>>> Thanks,
>>>>> moon
>>>>>
>>>>> [1]
>>>>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L398
>>>>> [2]
>>>>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L370
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Mar 17, 2016 at 2:55 AM Balachandar R.A. <
>>>>> balachandar.ra@gmail.com> wrote:
>>>>>
>>>>>> Hello
>>>>>>
>>>>>> Can we use z.run() to run a set of paragraphs? In my notebook, I have
>>>>>> spark and angular paragraphs and I would fire running of, lets say, 5
>>>>>> paragraphs, preferably, simultaneously. These paragraphs launch various
>>>>>> visualization widgets (bar charts, leaflet map, and cytoscape network
>>>>>> graphs). So, paragraph A creates a necessary data structures from which
>>>>>> these visualizations can be created, and run all the other paragraphs.
>>>>>> Please let me know how can I achieve this?
>>>>>>
>>>>>> regards
>>>>>> Bala
>>>>>>
>>>>>
>>>
>>
Re: use of z.run
Posted by moon soo Lee <mo...@apache.org>.
Hi,
Could you try pass context to z.run() ?
z.angularWatch("routeSelected", (before, after, context) => {
z.run(8, context)
}
Thanks,
moon
On Fri, Mar 18, 2016 at 4:22 AM Balachandar R.A. <ba...@gmail.com>
wrote:
> Hello,
>
> Thanks for discussing this issue. Yes, I would like to run a angular
> paragraph from another angular paragraph. Now, I have explored a bit about
> angularWatch and looked very promising. I have more or less achieved what I
> wanted to. But still it is not 100%.
>
> I have this piece of code in one of my spark paragraph. This is para 6.
>
>
>
>
> .....
>
> z.angularBind("routeSelected", 0);
>
> z.angularUnwatch("routeSelected");
>
> z.angularWatch("routeSelected", (before, after) => {
>
> // trigger re-rendering of cytoscape graphs
>
> z.run(8) // re-render cytoscape density graph
>
> }
>
> )
>
> .....
>
> ......
>
>
>
> The routeSelected variable will be modified by para 7 which is angular
> based using the below code
>
> ...
>
> scope.routeSelected = scope.routeSelected + 1
>
> ....
>
>
>
>
>
> Since the variable routeSelected is under watch, I expected para 8 will
> run. But, the para 8 did not run automatically. To my surprise, it is run
> when I click anywhere in the para 8, 7 6. It is very strange. Any clue
> about this behavior?
>
>
>
> regards
>
> Bala
>
>
>
> On 18 March 2016 at 10:40, Corneau Damien <co...@gmail.com> wrote:
>
>> Do you need to run a paragraph from the %angular paragraph?
>> From what you described before, you wanted to do z.run() from spark.
>>
>> If you need to run from %angular, you can try this PR:
>> https://github.com/apache/incubator-zeppelin/pull/742
>>
>> On Fri, Mar 18, 2016 at 1:55 PM, Balachandar R.A. <
>> balachandar.ra@gmail.com> wrote:
>>
>>> Hi
>>>
>>> Thanks for the hint. But z.run() is not working inside %angular
>>> paragraph in my notebook. Any idea?
>>>
>>> Regards
>>> Bala
>>> On 17-Mar-2016 11:39 pm, "moon soo Lee" <mo...@apache.org> wrote:
>>>
>>>> Hi Bala,
>>>>
>>>> z.run() accept both integer index of paragraph (starts from 0) [1] or
>>>> paragraph id [2].
>>>>
>>>> So you can do something like
>>>>
>>>> %spark
>>>> (2 to 5).foreach{ idx => z.run(idx) }
>>>>
>>>> or
>>>>
>>>> %spark
>>>> import collection.JavaConversions._
>>>> z.listParagraphs.foreach(paragraphId=> z.run(paragraphId))
>>>>
>>>> Hope this helps.
>>>>
>>>> Thanks,
>>>> moon
>>>>
>>>> [1]
>>>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L398
>>>> [2]
>>>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L370
>>>>
>>>>
>>>>
>>>> On Thu, Mar 17, 2016 at 2:55 AM Balachandar R.A. <
>>>> balachandar.ra@gmail.com> wrote:
>>>>
>>>>> Hello
>>>>>
>>>>> Can we use z.run() to run a set of paragraphs? In my notebook, I have
>>>>> spark and angular paragraphs and I would fire running of, lets say, 5
>>>>> paragraphs, preferably, simultaneously. These paragraphs launch various
>>>>> visualization widgets (bar charts, leaflet map, and cytoscape network
>>>>> graphs). So, paragraph A creates a necessary data structures from which
>>>>> these visualizations can be created, and run all the other paragraphs.
>>>>> Please let me know how can I achieve this?
>>>>>
>>>>> regards
>>>>> Bala
>>>>>
>>>>
>>
>
Re: use of z.run
Posted by "Balachandar R.A." <ba...@gmail.com>.
Hello,
Thanks for discussing this issue. Yes, I would like to run a angular
paragraph from another angular paragraph. Now, I have explored a bit about
angularWatch and looked very promising. I have more or less achieved what I
wanted to. But still it is not 100%.
I have this piece of code in one of my spark paragraph. This is para 6.
.....
z.angularBind("routeSelected", 0);
z.angularUnwatch("routeSelected");
z.angularWatch("routeSelected", (before, after) => {
// trigger re-rendering of cytoscape graphs
z.run(8) // re-render cytoscape density graph
}
)
.....
......
The routeSelected variable will be modified by para 7 which is angular
based using the below code
...
scope.routeSelected = scope.routeSelected + 1
....
Since the variable routeSelected is under watch, I expected para 8 will
run. But, the para 8 did not run automatically. To my surprise, it is run
when I click anywhere in the para 8, 7 6. It is very strange. Any clue
about this behavior?
regards
Bala
On 18 March 2016 at 10:40, Corneau Damien <co...@gmail.com> wrote:
> Do you need to run a paragraph from the %angular paragraph?
> From what you described before, you wanted to do z.run() from spark.
>
> If you need to run from %angular, you can try this PR:
> https://github.com/apache/incubator-zeppelin/pull/742
>
> On Fri, Mar 18, 2016 at 1:55 PM, Balachandar R.A. <
> balachandar.ra@gmail.com> wrote:
>
>> Hi
>>
>> Thanks for the hint. But z.run() is not working inside %angular paragraph
>> in my notebook. Any idea?
>>
>> Regards
>> Bala
>> On 17-Mar-2016 11:39 pm, "moon soo Lee" <mo...@apache.org> wrote:
>>
>>> Hi Bala,
>>>
>>> z.run() accept both integer index of paragraph (starts from 0) [1] or
>>> paragraph id [2].
>>>
>>> So you can do something like
>>>
>>> %spark
>>> (2 to 5).foreach{ idx => z.run(idx) }
>>>
>>> or
>>>
>>> %spark
>>> import collection.JavaConversions._
>>> z.listParagraphs.foreach(paragraphId=> z.run(paragraphId))
>>>
>>> Hope this helps.
>>>
>>> Thanks,
>>> moon
>>>
>>> [1]
>>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L398
>>> [2]
>>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L370
>>>
>>>
>>>
>>> On Thu, Mar 17, 2016 at 2:55 AM Balachandar R.A. <
>>> balachandar.ra@gmail.com> wrote:
>>>
>>>> Hello
>>>>
>>>> Can we use z.run() to run a set of paragraphs? In my notebook, I have
>>>> spark and angular paragraphs and I would fire running of, lets say, 5
>>>> paragraphs, preferably, simultaneously. These paragraphs launch various
>>>> visualization widgets (bar charts, leaflet map, and cytoscape network
>>>> graphs). So, paragraph A creates a necessary data structures from which
>>>> these visualizations can be created, and run all the other paragraphs.
>>>> Please let me know how can I achieve this?
>>>>
>>>> regards
>>>> Bala
>>>>
>>>
>
Re: use of z.run
Posted by Corneau Damien <co...@gmail.com>.
Do you need to run a paragraph from the %angular paragraph?
>From what you described before, you wanted to do z.run() from spark.
If you need to run from %angular, you can try this PR:
https://github.com/apache/incubator-zeppelin/pull/742
On Fri, Mar 18, 2016 at 1:55 PM, Balachandar R.A. <ba...@gmail.com>
wrote:
> Hi
>
> Thanks for the hint. But z.run() is not working inside %angular paragraph
> in my notebook. Any idea?
>
> Regards
> Bala
> On 17-Mar-2016 11:39 pm, "moon soo Lee" <mo...@apache.org> wrote:
>
>> Hi Bala,
>>
>> z.run() accept both integer index of paragraph (starts from 0) [1] or
>> paragraph id [2].
>>
>> So you can do something like
>>
>> %spark
>> (2 to 5).foreach{ idx => z.run(idx) }
>>
>> or
>>
>> %spark
>> import collection.JavaConversions._
>> z.listParagraphs.foreach(paragraphId=> z.run(paragraphId))
>>
>> Hope this helps.
>>
>> Thanks,
>> moon
>>
>> [1]
>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L398
>> [2]
>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L370
>>
>>
>>
>> On Thu, Mar 17, 2016 at 2:55 AM Balachandar R.A. <
>> balachandar.ra@gmail.com> wrote:
>>
>>> Hello
>>>
>>> Can we use z.run() to run a set of paragraphs? In my notebook, I have
>>> spark and angular paragraphs and I would fire running of, lets say, 5
>>> paragraphs, preferably, simultaneously. These paragraphs launch various
>>> visualization widgets (bar charts, leaflet map, and cytoscape network
>>> graphs). So, paragraph A creates a necessary data structures from which
>>> these visualizations can be created, and run all the other paragraphs.
>>> Please let me know how can I achieve this?
>>>
>>> regards
>>> Bala
>>>
>>
Re: use of z.run
Posted by moon soo Lee <mo...@apache.org>.
'z' - ZeppelinContext is some convenient function provided by
SparkInterpreter. So not available in the other interpreters, unless we
generalize it and make it available in all other interpreters.
DuyHai's work https://github.com/apache/incubator-zeppelin/pull/740 provides
'z' in front-end (javascript) side. And that will work in %angular
paragraph.
Thanks,
moon
On Thu, Mar 17, 2016 at 9:55 PM Balachandar R.A. <ba...@gmail.com>
wrote:
> Hi
>
> Thanks for the hint. But z.run() is not working inside %angular paragraph
> in my notebook. Any idea?
>
> Regards
> Bala
> On 17-Mar-2016 11:39 pm, "moon soo Lee" <mo...@apache.org> wrote:
>
>> Hi Bala,
>>
>> z.run() accept both integer index of paragraph (starts from 0) [1] or
>> paragraph id [2].
>>
>> So you can do something like
>>
>> %spark
>> (2 to 5).foreach{ idx => z.run(idx) }
>>
>> or
>>
>> %spark
>> import collection.JavaConversions._
>> z.listParagraphs.foreach(paragraphId=> z.run(paragraphId))
>>
>> Hope this helps.
>>
>> Thanks,
>> moon
>>
>> [1]
>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L398
>> [2]
>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L370
>>
>>
>>
>> On Thu, Mar 17, 2016 at 2:55 AM Balachandar R.A. <
>> balachandar.ra@gmail.com> wrote:
>>
>>> Hello
>>>
>>> Can we use z.run() to run a set of paragraphs? In my notebook, I have
>>> spark and angular paragraphs and I would fire running of, lets say, 5
>>> paragraphs, preferably, simultaneously. These paragraphs launch various
>>> visualization widgets (bar charts, leaflet map, and cytoscape network
>>> graphs). So, paragraph A creates a necessary data structures from which
>>> these visualizations can be created, and run all the other paragraphs.
>>> Please let me know how can I achieve this?
>>>
>>> regards
>>> Bala
>>>
>>
Re: use of z.run
Posted by "Balachandar R.A." <ba...@gmail.com>.
Hi
Thanks for the hint. But z.run() is not working inside %angular paragraph
in my notebook. Any idea?
Regards
Bala
On 17-Mar-2016 11:39 pm, "moon soo Lee" <mo...@apache.org> wrote:
> Hi Bala,
>
> z.run() accept both integer index of paragraph (starts from 0) [1] or
> paragraph id [2].
>
> So you can do something like
>
> %spark
> (2 to 5).foreach{ idx => z.run(idx) }
>
> or
>
> %spark
> import collection.JavaConversions._
> z.listParagraphs.foreach(paragraphId=> z.run(paragraphId))
>
> Hope this helps.
>
> Thanks,
> moon
>
> [1]
> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L398
> [2]
> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L370
>
>
>
> On Thu, Mar 17, 2016 at 2:55 AM Balachandar R.A. <ba...@gmail.com>
> wrote:
>
>> Hello
>>
>> Can we use z.run() to run a set of paragraphs? In my notebook, I have
>> spark and angular paragraphs and I would fire running of, lets say, 5
>> paragraphs, preferably, simultaneously. These paragraphs launch various
>> visualization widgets (bar charts, leaflet map, and cytoscape network
>> graphs). So, paragraph A creates a necessary data structures from which
>> these visualizations can be created, and run all the other paragraphs.
>> Please let me know how can I achieve this?
>>
>> regards
>> Bala
>>
>
Re: use of z.run
Posted by moon soo Lee <mo...@apache.org>.
Hi Bala,
z.run() accept both integer index of paragraph (starts from 0) [1] or
paragraph id [2].
So you can do something like
%spark
(2 to 5).foreach{ idx => z.run(idx) }
or
%spark
import collection.JavaConversions._
z.listParagraphs.foreach(paragraphId=> z.run(paragraphId))
Hope this helps.
Thanks,
moon
[1]
https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L398
[2]
https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L370
On Thu, Mar 17, 2016 at 2:55 AM Balachandar R.A. <ba...@gmail.com>
wrote:
> Hello
>
> Can we use z.run() to run a set of paragraphs? In my notebook, I have
> spark and angular paragraphs and I would fire running of, lets say, 5
> paragraphs, preferably, simultaneously. These paragraphs launch various
> visualization widgets (bar charts, leaflet map, and cytoscape network
> graphs). So, paragraph A creates a necessary data structures from which
> these visualizations can be created, and run all the other paragraphs.
> Please let me know how can I achieve this?
>
> regards
> Bala
>