Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Update ambrose with speculative execution/sample data when ILLUSTRATE command is run in grunt #12

Open
rjurney opened this Issue May 13, 2012 · 4 comments

Comments

Projects
None yet
4 participants
Contributor

rjurney commented May 13, 2012

I don't know how hard this is. I don't know how to do it. I am highly motivated to make this happen.

Thoughts?

Contributor

billonahill commented May 13, 2012

The tricky part here is being able to capture the illustrate output to render to the UI. I'm not sure how to do this. Let's dig around a bit.

Contributor

rjurney commented May 13, 2012

I've captured it in a pipe from grunt before :) in my head, there is a
way to hook into jetty right around where the print statements happen.

Russell Jurney http://datasyndrome.com

On May 13, 2012, at 3:31 PM, Bill Graham
reply@reply.github.com
wrote:

The tricky part here is being able to capture the illustrate output to render to the UI. I'm not sure how to do this. Let's dig around a bit.


Reply to this email directly or view it on GitHub:
#12 (comment)

Contributor

dvryaboy commented May 14, 2012

Speculative execution means something else.. you just mean Illustrate.

I would say this should take a back seat to getting the DAG viz right, let's not spread ourselves too thin. There's a GSoC student working on pre-launch visualization (dag so far, illustrate, etc) according to his proposal. He is being mentored by Russel and Daniel. It would be fantastic if that work could be incorporated into ambrose, but our focus should remain not on pre-launch, but visualization of execution time and post-factum analysis.

I did the same thing for a project (redirecting grunt shell output to UI) using the following technique

private static ByteArrayOutputStream baos;
private static PrintStream printStream;
baos = new ByteArrayOutputStream();
printStream = new PrintStream(baos);
System.setOut(printStream);

//illustrate code
pigServer.registerQuery(query);
Map<Operator, DataBag> examples = pigServer.getExamples(alias);
Map<String, LogicalPlan> aliases = pigServer.getAliases();
Set opers = examples.keySet();
for(Operator oper : opers) {
if(oper.getName() == alias ) {
LogicalPlan lp = aliases.get(alias);
DisplayExamples.printSimple(oper, lp, examples);
}
}
response.getWriter().write(baos.toString("UTF8"));

This is just for writing the illustrate output to servlet response stream.

On the client side, we should be able to display it a pretty format.

Hope this helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment