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
[SPARK-10873] Support column sort and search for History Server. #10648
Conversation
… datatable and REST API.
ok to test |
Haven't looked at the code, but the zebra striping is messed up when you have multiple attempts. |
the striping is the same as the current history server (1.5) when you have multiple attempts. The only difference I see if the striping on the first 2 columns is disabled on the current version. I'm fine with changing it if its not to much hassle. |
Test build #48961 has finished for PR 10648 at commit
|
search: 'applied', | ||
} | ||
|
||
GroupedColumnsOrderDir = 'desc'; // change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This external js file fro RowsGroup is using MIT license. I modified this line to set the default order from "asc" to "desc". This change is necessary that by default the latest applications will be displayed on the first page.
Also, I commented line 181out so that it will not disable sorting on the last 6 columns.
Do we need to add an additional license for this two minor changes?
Test build #48966 has finished for PR 10648 at commit
|
Test build #48968 has finished for PR 10648 at commit
|
Hi @vanzin , I added two new fields (duration Long, lastUpdated Date) into ApplicationAttemptInfo in api.scala.
|
Since the constructor is private anyway, it's fine to just do what the error message says and add the exclusions to MimaExcludes.scala. |
Hi @vanzin , thanks for the info. |
Test build #48976 has finished for PR 10648 at commit
|
…nger applicable href link test
Test build #49025 has finished for PR 10648 at commit
|
@vanzin @srowen @JoshRosen @steveloughran @andrewor14 @rxin I want to get input on what people think of using the datatables? If everyone is ok with it we can review in more detail. I think starting out with history page and then perhaps changing all the UI to use datatables to its consistent across the board. |
I don't have a problem with it if the license are ok; I just don't have the cycles right now to review the code. :-( |
Screenshot looks amazing, thanks @zhuoliu! I think @JoshRosen has some opinions on using a database for the history server. |
I have some opinions too, as with YARN timeline service integration, it's essentially hooked up to a database, both for publishing and retrieval. It might be interesting to consider a dual mode, where things are published to HDFS/s3/WASB during a run (availability will match that of the analytics work itself), and for retrieval, after any initial load & parse, persist in a DB. You could do that with the current FS records, extracting useful summary data "completed" "incompatible-version" in the process. |
The use of a database seems like it could be separate from this pr. This pr does change it to use the rest api but the main change here is the use of datatables to allow for sorting, searching, etc. I haven't heard any issue with using that so I'll go ahead with a more thorough review. If I missed someone concern with that please let me know ASAP. |
Jenkins, test this please |
Test build #49878 has finished for PR 10648 at commit
|
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment saying this is same as UIUtils.formatDuration
Test build #49899 has finished for PR 10648 at commit
|
@@ -291,3 +291,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt. | |||
(MIT License) dagre-d3 (https://github.com/cpettitt/dagre-d3) | |||
(MIT License) sorttable (https://github.com/stuartlangridge/sorttable) | |||
(MIT License) boto (https://github.com/boto/boto/blob/develop/LICENSE) | |||
(MIT/GPL License) datatables (http://datatables.net/license) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the version we pull in is MIT licenses so lets removed GPL license
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't matter much since it's MIT or GPL, and I think this 'notation' was started by the automated output of a Maven plugin.
This is sufficient for MIT-licensed code. I'm a bit concerned about pulling in a lot of third party source just for this feature, but hey.
It looks like you're pulling in an inconsistent set of jquery files though. 1.11.1 vs 1.10.4? or maybe I'm misreading this. They show up as 1-line diffs.
@@ -291,3 +291,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt. | |||
(MIT License) dagre-d3 (https://github.com/cpettitt/dagre-d3) | |||
(MIT License) sorttable (https://github.com/stuartlangridge/sorttable) | |||
(MIT License) boto (https://github.com/boto/boto/blob/develop/LICENSE) | |||
(MIT/GPL License) datatables (http://datatables.net/license) | |||
(MIT/GPL License) blockUI (http://jquery.malsup.com/block/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar here since it allows user to choose MIT or GPL lets just put MIT.
Test build #50109 has finished for PR 10648 at commit
|
|
||
historySummary = $("#history-summary"); | ||
searchString = JSON.stringify(historySummary["context"]["location"]["search"]); | ||
requestedIncomplete = searchString.indexOf("true") >= 0 ? true : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be better if we specifically look for the paramter showIncomplete=true or false here
Test build #50155 has finished for PR 10648 at commit
|
} | ||
|
||
function getParameterByName(name, searchString) { | ||
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need this.
The paging doesn't seem to be working can you take a look. Then could you also line up the table indentation with the other text for "Event log directory" |
Test build #50196 has finished for PR 10648 at commit
|
Hi @tgravescs , finally fixed the paging stuff in RowsGrouping. :) |
Test build #50248 has finished for PR 10648 at commit
|
@tgravescs @zhuoliu are you guys interested in more UI work? I have some ideas that I never found time / people to work on ... I think they will make the UI a lot more useful. |
@rxin I would be interested in hearing them if they make debugging easier and usability better. We'll have to prioritize it with the rest of the work we have. We would like to change most of the pages to use the datatables to keep things consistent so if its things we can do at the same time it might be easier. |
mostly looks good a few more minor things.
|
JIRA filed here: https://issues.apache.org/jira/browse/SPARK-13064 |
Jenkins, test this please |
Test build #50306 has finished for PR 10648 at commit
|
Jenkins, test this please |
+1 for the latest changes, the unit tests failures are unrelated. Going to give this a little while but if they are hung again commit this anyway since the latest changes made don't affect unit tests. |
[SPARK-10873] Support column sort and search for History Server using jQuery DataTable and REST API. Before this commit, the history server was generated hard-coded html and can not support search, also, the sorting was disabled if there is any application that has more than one attempt. Supporting search and sort (over all applications rather than the 20 entries in the current page) in any case will greatly improve user experience. 1. Create the historypage-template.html for displaying application information in datables. 2. historypage.js uses jQuery to access the data from /api/v1/applications REST API, and use DataTable to display each application's information. For application that has more than one attempt, the RowsGroup is used to merge such entries while at the same time supporting sort and search. 3. "duration" and "lastUpdated" rest API are added to application's "attempts". 4. External javascirpt and css files for datatables, RowsGroup and jquery plugins are added with licenses clarified. Snapshots for how it looks like now: History page view: ![historypage](https://cloud.githubusercontent.com/assets/11683054/12184383/89bad774-b55a-11e5-84e4-b0276172976f.png) Search: ![search](https://cloud.githubusercontent.com/assets/11683054/12184385/8d3b94b0-b55a-11e5-869a-cc0ef0a4242a.png) Sort by started time: ![sort-by-started-time](https://cloud.githubusercontent.com/assets/11683054/12184387/8f757c3c-b55a-11e5-98c8-577936366566.png) Author: zhuol <zhuol@yahoo-inc.com> Closes apache#10648 from zhuoliu/10873.
[SPARK-10873] Support column sort and search for History Server using jQuery DataTable and REST API. Before this commit, the history server was generated hard-coded html and can not support search, also, the sorting was disabled if there is any application that has more than one attempt. Supporting search and sort (over all applications rather than the 20 entries in the current page) in any case will greatly improve user experience. 1. Create the historypage-template.html for displaying application information in datables. 2. historypage.js uses jQuery to access the data from /api/v1/applications REST API, and use DataTable to display each application's information. For application that has more than one attempt, the RowsGroup is used to merge such entries while at the same time supporting sort and search. 3. "duration" and "lastUpdated" rest API are added to application's "attempts". 4. External javascirpt and css files for datatables, RowsGroup and jquery plugins are added with licenses clarified. Snapshots for how it looks like now: History page view: ![historypage](https://cloud.githubusercontent.com/assets/11683054/12184383/89bad774-b55a-11e5-84e4-b0276172976f.png) Search: ![search](https://cloud.githubusercontent.com/assets/11683054/12184385/8d3b94b0-b55a-11e5-869a-cc0ef0a4242a.png) Sort by started time: ![sort-by-started-time](https://cloud.githubusercontent.com/assets/11683054/12184387/8f757c3c-b55a-11e5-98c8-577936366566.png) Author: zhuol <zhuol@yahoo-inc.com> Closes apache#10648 from zhuoliu/10873.
[SPARK-10873] Support column sort and search for History Server using jQuery DataTable and REST API. Before this commit, the history server was generated hard-coded html and can not support search, also, the sorting was disabled if there is any application that has more than one attempt. Supporting search and sort (over all applications rather than the 20 entries in the current page) in any case will greatly improve user experience.
Snapshots for how it looks like now:
History page view:
Search:
Sort by started time: