Skip to content

Conversation

@shahidki31
Copy link
Contributor

What changes were proposed in this pull request?

In the PR #26215, we supported pagination for sqlstats table in JDBC/ODBC server page. In this PR, we are extending the support of pagination to sqlstats session table by making use of existing pagination classes in #26215.

Why are the changes needed?

Support pagination for sqlsessionstats table in JDBC/ODBC server page in the WEBUI. It will easier for user to analyse the table and it may fix the potential issues like oom while loading the page, that may occur similar to the SQL page (refer #22645)

Does this PR introduce any user-facing change?

There will be no change in the sqlsessionstats table in JDBC/ODBC server page execpt pagination support.

How was this patch tested?

Manually verified.

Before:

Screenshot 2019-10-24 at 11 32 27 PM

After:

Screenshot 2019-10-24 at 10 58 53 PM

@shahidki31 shahidki31 changed the title [SPARK-29589][WEBUI] Support pagination for sqlstats session table in JDBC/ODBC Server page [SPARK-29589][WEBUI] Support pagination for sqlstats session table in JDBC/ODBC Session page Oct 24, 2019
@shahidki31
Copy link
Contributor Author

cc @srowen @wangyum In this PR, we are supporting pagination for SQL session Statistics table, using the existing pagination classes in the PR #26215. please review.

import org.apache.commons.text.StringEscapeUtils

import org.apache.spark.internal.Logging
import org.apache.spark.sql.hive.thriftserver.HiveThriftServer2.{ExecutionInfo, ExecutionState, SessionInfo}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unused import

<tr> {data.map(d => <td>{d}</td>)} </tr>
}
UIUtils.listingTable(headers, generateDataRow, data, fixedWidth = true)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unused code.

@SparkQA
Copy link

SparkQA commented Oct 24, 2019

Test build #112615 has finished for PR 26246 at commit f5082f5.

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

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

Generally looking good as a cleanup

@shahidki31
Copy link
Contributor Author

Retest this please

@SparkQA
Copy link

SparkQA commented Oct 25, 2019

Test build #112648 has finished for PR 26246 at commit 17273a0.

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

@SparkQA
Copy link

SparkQA commented Oct 25, 2019

Test build #112651 has finished for PR 26246 at commit 17273a0.

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

@SparkQA
Copy link

SparkQA commented Oct 25, 2019

Test build #112667 has finished for PR 26246 at commit f244203.

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

@srowen srowen closed this in 077fb99 Oct 26, 2019
@srowen
Copy link
Member

srowen commented Oct 26, 2019

Merged to master

@shahidki31
Copy link
Contributor Author

Thanks @srowen

dengziming pushed a commit to dengziming/spark that referenced this pull request Oct 28, 2019
… JDBC/ODBC Session page

In the PR apache#26215, we supported pagination for sqlstats table in JDBC/ODBC server page. In this PR, we are extending the support of pagination to sqlstats session table by making use of existing pagination classes in apache#26215.

Support pagination for sqlsessionstats table in JDBC/ODBC server page in the WEBUI. It will easier for user to analyse the table and it may fix the potential issues like oom while loading the page, that may occur similar to the SQL page (refer apache#22645)

There will be no change in the sqlsessionstats table in JDBC/ODBC server page execpt pagination support.

Manually verified.

Before:

![Screenshot 2019-10-24 at 11 32 27 PM](https://user-images.githubusercontent.com/23054875/67512507-96715000-f6b6-11e9-9f1f-ab1877eb24e6.png)

After:

![Screenshot 2019-10-24 at 10 58 53 PM](https://user-images.githubusercontent.com/23054875/67512314-295dba80-f6b6-11e9-9e3e-dd50c6e62fe9.png)

Closes apache#26246 from shahidki31/SPARK_29589.

Authored-by: shahid <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
Signed-off-by: dengziming <[email protected]>
Copy link
Contributor

@juliuszsompolski juliuszsompolski left a comment

Choose a reason for hiding this comment

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

<td>{formatDate(info.startTimestamp)}</td>
<td>{if (info.finishTimestamp > 0) formatDate(info.finishTimestamp)}</td>
<td>{if (info.closeTimestamp > 0) formatDate(info.closeTimestamp)}</td>
<td sorttable_customkey={info.totalTime(info.finishTimestamp).toString}>
Copy link
Contributor

Choose a reason for hiding this comment

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

did we remove this sorting option from the new table?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, because this is no longer required as we are sorting on the raw data.

case "Finish Time" => Ordering.by(_.executionInfo.finishTimestamp)

I verified, and sorting is working properly for all the columns. Did you face any issues?

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 the explanation @shahidki31 !
Indeed it works, sorry for my confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @juliuszsompolski , no issues.

@shahidki31 shahidki31 deleted the SPARK_29589 branch November 17, 2019 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants