Hello Jeff,
Thanks for your answer. Here is what I want to do:
<div id="runAll"></div>
<script type="application/javascript">
var element = $('#runAll');
var scope =
angular.element(element.parent('.ng-scope')).scope().compiledScope;
var z = scope.z;
scope.refresh = function () {
z.runParagraph('20200120-072110_977046884'); // è Load data from Spark
(spark parapgraph)
z.runParagraph('20200120-073038_1367909362'); // è Compute additional
dataframes (spark paragraph)
z.runParagraph('20200127-143445_1471220750'); // è Launch advanced
visualization with angular / Vega (angular paragraph)
}
</script>
<form class="form-inline">
<div class="form-group">
<button type="submit" class="btn btn-primary" ng-click="refresh()">
Refresh global paragraphs
</button>
I’ve tried to add a “z.run” at the end of a Spark paragraph, but it doesn’t
work, I have a “permission Denied” in my logs, it seems to come from the fact
that I have Kerberos enabled. Quite suprisingly, I don’t have this issue whe I
try to run a spark paragraph from an angular paragraph.
Of course, the global idea is to have a single button which woul refresh all
the paragrpah in the right order
From: Jeff Zhang [mailto:[email protected]]
Sent: Thursday, February 13, 2020 11:11
To: users
Subject: Re: End of completion for z.runParagraph
Because each interpreter has its own scheduler. They are in different
schedulers. BTW, do you mind to share your note so that people can understand
your question easier ?
<[email protected]> 于2020年2月13日周四 下午6:02写道:
Hello all,
I’d like to trigger many paragraphs execution from an angular one. If I launch
many spark ones, they are executed one after each other, but if I mix spark and
angular ones, angular ones are triggered even if spark ones are not finished
yet. I guess this comes from the asynchronous behavior of javascript. So, is
there any way to catch the end of a paragraph execution in order to be able to
trigger the next one?
Thanks,
Stéphane
--
Best Regards
Jeff Zhang
smime.p7s
Description: S/MIME cryptographic signature
