shahidki commented on a change in pull request #26378:
[SPARK-29724][SPARK-29726][WEBUI][SQL] Support JDBC/ODBC tab for HistoryServer
WebUI
URL: https://github.com/apache/spark/pull/26378#discussion_r349935734
##########
File path:
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerPage.scala
##########
@@ -28,31 +28,27 @@ import scala.xml.{Node, Unparsed}
import org.apache.commons.text.StringEscapeUtils
import org.apache.spark.internal.Logging
-import
org.apache.spark.sql.hive.thriftserver.HiveThriftServer2.{ExecutionInfo,
SessionInfo}
import org.apache.spark.sql.hive.thriftserver.ui.ToolTips._
import org.apache.spark.ui._
import org.apache.spark.ui.UIUtils._
import org.apache.spark.util.Utils
/** Page for Spark Web UI that shows statistics of the thrift server */
private[ui] class ThriftServerPage(parent: ThriftServerTab) extends
WebUIPage("") with Logging {
-
- private val listener = parent.listener
- private val startTime = Calendar.getInstance().getTime()
+ private val store = parent.store
+ private val startTime = parent.startTime
/** Render the page */
def render(request: HttpServletRequest): Seq[Node] = {
- val content =
- listener.synchronized { // make sure all parts in this page are
consistent
+ val content = // make sure all parts in this page are consistent
Review comment:
Yes, to avoid the inconsistency, put it in the synchronised block, as we are
accessing from multiple places. Updated Thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]