Skip to content

Conversation

@kishorvpatil
Copy link
Contributor

@kishorvpatil kishorvpatil commented Jun 14, 2016

  1. Create the executorspage-template.html for displaying application information in datables.
  2. Added REST API endpoint "allexecutors" to be able to see all executors created for particular job.
  3. The executorspage.js uses jQuery to access the data from /api/v1/applications/appid/allexecutors REST API, and use DataTable to display executors for the application. It also, generates summary of dead/live and total executors created during life of the application.
  4. Similar changes applicable to Executors Page on history server for a given application.

Snapshots for how it looks like now:
screen shot 2016-06-14 at 2 45 44 pm

New Executors Page screenshot looks like this:
screen shot 2016-06-15 at 10 12 01 am

@ajbozarth
Copy link
Member

Can you post a screenshot of how it looks after the change? I'll take a look through the code when I have a chance. Also @zhuoliu want to take a look since you were the one who added JQuery DataTables to the History Server

@kishorvpatil
Copy link
Contributor Author

@ajbozarth , Thank you for loooking into this patch. I have added screenshot with annotation. I hope that helps.

@tgravescs
Copy link
Contributor

Jenkins, ok to test

@SparkQA
Copy link

SparkQA commented Jun 15, 2016

Test build #60584 has finished for PR 13670 at commit 56f3901.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tgravescs
Copy link
Contributor

Jenkins, test this please

@SparkQA
Copy link

SparkQA commented Jun 15, 2016

Test build #60601 has finished for PR 13670 at commit 56f3901.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@ajbozarth
Copy link
Member

Jenkins, test this please

@SparkQA
Copy link

SparkQA commented Jun 16, 2016

Test build #60612 has finished for PR 13670 at commit 56f3901.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@zhuoliu
Copy link

zhuoliu commented Jun 16, 2016

Generally looks great to me, I am good with it as long as @tgravescs verifies. One minor concern is that we may move the utility functions from executorspage.js and historypage.ps to a common location.

@ajbozarth
Copy link
Member

My comment didn't post last night:
I haven't finished reading through your code yet, but after checking it out and starting up the web ui I get the following error on the executors page.
screen shot 2016-06-15 at 6 04 26 pm

@ajbozarth
Copy link
Member

I agree with @zhuoliu we should move common/util functions into a datatables util js.

For the above error, I pinpointed that it is baseURI that is null. I also never see the "Loading Executors Page" message i see in the code. I have also checked that the page doesn't load in any browser. @zhuoliu have you tried checking out and running the code?

@SparkQA
Copy link

SparkQA commented Jun 22, 2016

Test build #61070 has finished for PR 13670 at commit 3b4962a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 28, 2016

Test build #61387 has started for PR 13670 at commit c73e905.

@kishorvpatil
Copy link
Contributor Author

@zhuoliu , i have removed unwanted, unused javascript functions in the executorspage.js. There are no duplicate functions now between historyserver.js and this script..

@kishorvpatil
Copy link
Contributor Author

@ajbozarth, I do not see how I could produce the exception you see. Please help me reproduce this so that I can address it.

<td>A list of all active executors for the given application.</td>
</tr>
<tr>
<td><code>/applications/[app-id]/executors</code></td>
Copy link
Member

Choose a reason for hiding this comment

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

These are duplicate end points: /applications/[app-id]/executors

Copy link
Contributor

Choose a reason for hiding this comment

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

yep, I think you meant allexecutors

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@ajbozarth
Copy link
Member

I'll re-checkout later today and see if I can reproduce the error for you

@ajbozarth
Copy link
Member

I get the error by just starting up a spark-shell, but I only get it on Safari, it works fine on Chrome and Firefox. I'll make a line note of what I see going wrong


function createRESTEndPoint() {
var parser = document.createElement('a');
var words = parser.baseURI.split('/');
Copy link
Member

Choose a reason for hiding this comment

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

In Safari baseURI is null, it seems to be how Safari handles document.createElement, you may want to research it and possibly find another way to get the URL, there are no other uses of baseURI in the Spark code base.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As mentioned, I switched it to use document.baseURI which works with Safari as well.

@kishorvpatil
Copy link
Contributor Author

@tgravescs , moved formatBytes to utils.js.

@SparkQA
Copy link

SparkQA commented Jul 14, 2016

Test build #62343 has finished for PR 13670 at commit bc132b1.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jul 14, 2016

Test build #62346 has finished for PR 13670 at commit 66df19f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tgravescs
Copy link
Contributor

@ajbozarth were you able to try the latest version?

});

executorsSummary = $("#active-executors");
searchString = executorsSummary["context"]["location"]["search"];
Copy link
Contributor

Choose a reason for hiding this comment

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

unused, remove

@ajbozarth
Copy link
Member

Been busy the last couple days, I'll take a look at this Monday

@kishorvpatil
Copy link
Contributor Author

@tgravescs, I removed unwanted code/comment from the javascript.

@SparkQA
Copy link

SparkQA commented Jul 18, 2016

Test build #62472 has finished for PR 13670 at commit e81d45b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@ajbozarth
Copy link
Member

Sorry I couldn't get to this today, I'll do my best to take a look in the morning

return activeTasks > 0 ? ("hsla(240, 100%, 50%, " + activeTasksAlpha(activeTasks, maxTasks) + ")") : "";
}

function activeTasksColor(activeTasks, maxTasks) {
Copy link
Member

Choose a reason for hiding this comment

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

This is never used

@ajbozarth
Copy link
Member

I checked out out the latest code and ran it and it looks good, I also looked through the code and outside of the two unused functions I found the code looks good too.

Im comfortable giving this a LGTM

We may want to start setting a standard way to convert pages to use DataTables, this seemed more a difficult process than I thought it would be

@kishorvpatil
Copy link
Contributor Author

@ajbozarth Thank you for review. I removed unused methods from the the javascript.

I agree converting pages to DataTables is tricky and listing some standard way might be a huge help.

@SparkQA
Copy link

SparkQA commented Jul 20, 2016

Test build #62607 has finished for PR 13670 at commit 87301c1.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tgravescs
Copy link
Contributor

+1, thanks @kishorvpatil @ajbozarth

@asfgit asfgit closed this in b9bab4d Jul 20, 2016
@nblintao
Copy link
Contributor

Hi, @kishorvpatil. Cool improvement! I'm developing the Executors Page at #14204 based on your changes. But I have a small question about your new implementation of the tables.
In the implementation of ExecutorsPage.scala before, logsExist is checked and there will be no Logs column if it's empty for all rows. But now, I haven't found similar implementation in the executorspage.js. I'm not sure whether it is handled by JQuery DataTables automatically, or I'm missing something, or this is not available for now? Thanks.

@kishorvpatil
Copy link
Contributor Author

@nblintao , I am not sure why we had the check of existence of logs - specially when the reference to logs is static link for stdout and stderr.
Unless there is scenario where there could be multiple log entries and dynamic list of logs- i suggest that would require coding of different solution - mere check for existence and dropping out column altogether would not help.

@ajbozarth
Copy link
Member

@kishorvpatil I can't believe I missed that. The logs only exist if you have logging turned on in your confs, if it's off there won't be any logs and no reason for the column. @nblintao if you want to file a JIRA either you @kishorvpatil or I can quickly fix that

@tgravescs
Copy link
Contributor

personally I don't see this as a big deal. As long as it doesn't show the links, the column being there doesn't hurt anything and it keeps things more consistent. Perhaps change it to say Not Available or something?

If you thinkts its an issue lets file a separate jira for this and discuss further there.

@ajbozarth
Copy link
Member

I opened SPARK-16673 for the issue since it also apply to the Thread Dump column which the History Server shouldn't display.

asfgit pushed a commit that referenced this pull request Aug 19, 2016
…and Thread Dump columns

## What changes were proposed in this pull request?

When #13670 switched `ExecutorsPage` to use JQuery DataTables it incidentally removed the conditional for the Logs and Thread Dump columns. I reimplemented the conditional display of the Logs and Thread dump columns as it was before the switch.

## How was this patch tested?

Manually tested and dev/run-tests

![both](https://cloud.githubusercontent.com/assets/13952758/17186879/da8dd1a8-53eb-11e6-8b0c-d0ff0156a9a7.png)
![dump](https://cloud.githubusercontent.com/assets/13952758/17186881/dab08a04-53eb-11e6-8b1c-50ffd0bf2ae8.png)
![logs](https://cloud.githubusercontent.com/assets/13952758/17186880/dab04d00-53eb-11e6-8754-68dd64d6d9f4.png)

Author: Alex Bozarth <[email protected]>

Closes #14382 from ajbozarth/spark16673.
@merlintang
Copy link

@kishorvpatil
you provided the function allexecutors, which is used to return the dead and active executor information.

For the document
http://spark.apache.org/docs/latest/monitoring.html
for
/applications/[app-id]/executors A list of all executors for the given application.

We had better document more clearly what is meaning of functions for the 2.1 version.
/applications/[app-id]/executors xxx
/applications/[app-id]/allexecutors xxxx

This confused people, because our test already run into this issue.

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

Successfully merging this pull request may close these issues.

7 participants