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

Snap 2603 : Display list of Global Temporary Views/Tables with relevant details on Snappy UI. #1246

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

snappy-sachin
Copy link
Contributor

Changes proposed in this pull request

Requirements:

  • Display list of Global Temporary Views/Tables with relevant details on Snappy UI.

Changes:

  • Adding resource named AllGlobalTemporaryViewsResource.scala for getting global temporary details.
  • Adding resource path "allglobaltempviews"
  • Updating Snappy Dashboard HTML page for displaying list of all global temporary views/tables.
  • Updated getStatsFromAllServers to fetch and return the global temporary views details.
  • Relevant code changes in TableStatsProviderService, SnappyTableStatsProviderService and SnappyThinConnectorTableStatsProvider.

Patch testing

  • Manually Tested

ReleaseNotes.txt changes

  • Yes

Other PRs

Store: TIBCOSoftware/snappy-store#460
Spark: TIBCOSoftware/snappy-spark#135

…with relevant details on Snappy UI.

 - Adding resource named AllGlobalTemporaryViewsResource.scala for getting global temporary details.
 - Adding resource path "allglobaltempviews"
 - Updating Snappy Dashboard HTML page for displaying list of all global temporary views/tables.
 - Updated getStatsFromAllServers to fetch and return the global temporary views details.
 - Relevant code changes in TableStatsProviderService, SnappyTableStatsProviderService
   and SnappyThinConnectorTableStatsProvider.
 - Code changes for displaying temporary global table's Field details.
Copy link
Contributor

@sumwale sumwale left a comment

Choose a reason for hiding this comment

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

See comment. Lot of code looks unnecessary and could be just added in getStatsFromAllServers

val globalTempSchema: String = "global_temp"
val gblTempViewList = snappySessionCatalog.listTables(globalTempSchema)

if (gblTempViewList.isEmpty) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Temporarily creating a session just for listing the tables is quite inefficient. Can't this be included as part of regular tableTypesMap created in getStatsFromAllServers (where tableType can be GLOBAL_TEMPORARY)?

To get the list without session use: SnappyContext.sharedState(sc = null).globalTempViewManager.listViewNames("*"). This avoids unnecessary creation of a SnappyContext object which is expensive and not required. Secondly this list can just be appended to the list of "hiveTables" in getStatsFromAllServers with tableType=GLOBAL_TEMPORARY. Display can use the tableType to distinguish. This avoids separate calls for this as well as the new message.

@PradeepSurale
Copy link
Contributor

Can one of the admins verify this patch?

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.

None yet

3 participants