Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback for /docs/quarks/console/ #43

Open
chanskw opened this issue Mar 3, 2016 · 7 comments
Open

Feedback for /docs/quarks/console/ #43

chanskw opened this issue Mar 3, 2016 · 7 comments

Comments

@chanskw
Copy link
Collaborator

chanskw commented Mar 3, 2016

Why do we need to wait for 10 seconds before the job is submitted? Is this the best practise?

// print the console URL and wait for 10 seconds before submitting the topology
System.out.println(dp.getServices().getService(HttpServer.class).getConsoleUrl());
try {
TimeUnit.SECONDS.sleep(10);
} catch (InterruptedException e) {
//do nothing
}

@home4slc
Copy link

home4slc commented Mar 3, 2016

We don't. I'm working on that page and removing that wait.

Take care,

Susan

On Mar 2, 2016, at 9:00 PM, Samantha Chan [email protected] wrote:

Why do we need to wait for 10 seconds before the job is submitted? Is this the best practise?

// print the console URL and wait for 10 seconds before submitting the topology
System.out.println(dp.getServices().getService(HttpServer.class).getConsoleUrl());
try {
TimeUnit.SECONDS.sleep(10);
} catch (InterruptedException e) {
//do nothing
}


Reply to this email directly or view it on GitHub.

@mikespicer
Copy link
Contributor

I added the wait because the app started writing to the console straight away and it was very difficult/impossible to cut and paste the URL to access the console before it was flushed from the console window in eclipse by the sensor output. The 10 second wait gives you plenty of time to see and copy the URL before the applications output starts.

@ddebrunner
Copy link
Collaborator

I made a similar comment on the pull request:

Why is there a 10 second wait?

The comment needs to explain why, otherwise the risk exists it will be copied in real applications.

@home4slc
Copy link

home4slc commented Mar 3, 2016

Since I'm working on this page right now I'm inclined to take out the wait and provide a few options for the user:

  • don't include any other System.out.println in the application
  • scroll in the window at the beginning to find the console url
  • put in a wait per the existing example.

In the detailed example I'm referring to the wait is not present.

I can modify the existing example with an either or situation - comment out the print() and remove the wait, or explain if the print() is present to include the wait.
Are folks good with that - especially @mikespicer , @ddebrunner ?

@mikespicer
Copy link
Contributor

As long as the example works in a way that a new user can easily get the URL and access the console, I don't have a strong preference.

@mikespicer
Copy link
Contributor

FYI, In terms of "scroll in the window at the beginning to find the console url" if you mean that the user could just scroll up to get the URL the buffer fills and very quickly its no longer available by scrolling up.

@home4slc
Copy link

home4slc commented Mar 3, 2016

Yes, it depends on how fast the output is occurring, but I understand. Another option is to output the console url to a file. I can add that option too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants