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

[FLINK-2730][web-dashboard] Adds cpu and memory usage graphs. #1236

Closed
wants to merge 1 commit into from

Conversation

sachingoel0101
Copy link
Contributor

Screenshots:
screenshot 21
screenshot 22
screenshot 23
screenshot 24

I would really like to get this in the release. One more step towards removing the old frontend. :)

@aljoscha
Copy link
Contributor

aljoscha commented Oct 7, 2015

Wow, the screenshots look super nice. 😄

Someone with knowledge about the new web fronted should probably review the code, though.

@tillrohrmann
Copy link
Contributor

Really cool graphs Sachin :-) Looking forward monitoring my Flink jobs with
these graphs.

On Wed, Oct 7, 2015 at 3:10 PM, Aljoscha Krettek notifications@github.com
wrote:

Wow, the screenshots look super nice. [image: 😄]

Someone with knowledge about the new web fronted should probably review
the code, though.


Reply to this email directly or view it on GitHub
#1236 (comment).

@sachingoel0101
Copy link
Contributor Author

Thanks. :)
Although there's not much to review here. :') It's mostly a rearrangement of existing content, with a major addition in taskmanager.ctrl.coffee

@aljoscha
Copy link
Contributor

aljoscha commented Oct 7, 2015

@iampeter, could you please have a look so that we can quickly merge this?

@iampeter
Copy link
Contributor

iampeter commented Oct 7, 2015

@aljoscha ok will do

@iampeter
Copy link
Contributor

iampeter commented Oct 7, 2015

@sachingoel0101 @aljoscha looks great, but I would make the following changes if possible:

  1. Move the 'livechart' directive to a separate file - taskmanager.dir.coffee
  2. Move the Highcharts config in index.coffee to either .run() in index.coffee, or the directive
  3. Remove the 'No such task manager exists' text that blinks when the task manager details are loading

Thanks,
Piotr

@aljoscha
Copy link
Contributor

aljoscha commented Oct 8, 2015

Thanks for the review @iampeter 😄

@sachingoel0101
Copy link
Contributor Author

@iampeter , thanks for the review. I've addressed all your comments.
I removed the No such task ... thing entirely. It doesn't have a use case anyways. We don't expect the user to break things on the server here. If the task manager doesn't exist, it is handled gracefully by the backend and an empty array is returned.

@sachingoel0101
Copy link
Contributor Author

@aljoscha FYI I've added a new Job Manager message which returns the metrics only for one particular instance to minimize unnecessary traffic for a single taskmanager web page. That okay?

@sachingoel0101
Copy link
Contributor Author

I think I broke something while addressing Piotr's concerns. Will debug and push the fixed version again.
Edit: Never mind. False alarm. 😄

Should be mergeable now.

@mxm
Copy link
Contributor

mxm commented Oct 9, 2015

The screenshots look great. I'll check out your work now :)

@@ -39,6 +42,7 @@

private final FiniteDuration timeout;

private static final String taskManagerIDKey = "taskmanagerid";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is referencing your addition in WebRuntimeMonitor. You can use this constant there as well. I would furthermore use the constant field style a la "TASKMANAGER_ID_KEY".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a fix.

sender ! decorateMessage(
TaskManagerInstance(instanceManager.getRegisteredInstanceById(instanceID))
)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to return an InstanceNotFound message instead of a null instance?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using an Option makes more sense here.

@mxm
Copy link
Contributor

mxm commented Oct 9, 2015

Tried out your changes it everything worked without quirks. The initial look is a bit odd when the charts haven't loaded yet but this is nothing that should prevent us from merging the PR. I've also made a comment inline.

+1 for merging

@sachingoel0101
Copy link
Contributor Author

The initial look is a bit weird, I agree. There is a potential fix, by fetching the usage upto the point when someone clicks on the metrics tab, however, that can be quite large if the cluster has been running for a long time. This would also require storing the metrics history on the job manager, which will unnecessarily waste memory.

@sachingoel0101
Copy link
Contributor Author

@mxm I modified the code to remove null values. It should be mergeable now.

@mxm
Copy link
Contributor

mxm commented Oct 9, 2015

Looks good to merge now.

@sachingoel0101
Copy link
Contributor Author

Build passes successfully. Looking forward to seeing this merged. :)

@mxm
Copy link
Contributor

mxm commented Oct 9, 2015

Merging this after a final test...

@asfgit asfgit closed this in 58ab14b Oct 9, 2015
@sachingoel0101 sachingoel0101 deleted the charts branch October 9, 2015 21:30
cfmcgrady pushed a commit to cfmcgrady/flink that referenced this pull request Oct 23, 2015
lofifnc pushed a commit to lofifnc/flink that referenced this pull request Oct 23, 2015
@@ -23,7 +23,8 @@
"dagre-d3": "~0.4.10",
"font-awesome": "~4.3.0",
"moment-duration-format": "~1.3.0",
"qtip2": "~2.2.1"
"qtip2": "~2.2.1",
"highcharts-release": "~4.1.8"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This library's license is incompatible with the Apache License. Unfortunately, nobody noticed this. We will have to revert the merged changes...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize. It should've been my responsibility primarily.
I think I might be able to achieve the same graphs and live updates using d3, which I assume is compatible. Working on it right now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! For now, we'll try to make a release without that page. We can add that back for 0.10.1 and 1.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. I can a open a PR to minimally remove this functionality unless the commit needs to be completely reverted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm already working on a change to remove only the charts. Apparently, d3 would work for us because it is BSD-lincensed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. I'll start working on d3 based charts after you push your commit.

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