From reviews-return-1046489-archive-asf-public=cust-asf.ponee.io@spark.apache.org Mon Feb 24 22:54:41 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3C15D180669 for ; Mon, 24 Feb 2020 23:54:41 +0100 (CET) Received: (qmail 90839 invoked by uid 500); 24 Feb 2020 22:54:40 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 90772 invoked by uid 99); 24 Feb 2020 22:54:40 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Feb 2020 22:54:40 +0000 From: GitBox To: reviews@spark.apache.org Subject: [GitHub] [spark] HeartSaVioR commented on a change in pull request #27687: [SPARK-30943][SS] Show "batch ID" in tool tip string for Structured Streaming UI graphs Message-ID: <158258488049.3038.7459775343262902572.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Mon, 24 Feb 2020 22:54:40 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit HeartSaVioR commented on a change in pull request #27687: [SPARK-30943][SS] Show "batch ID" in tool tip string for Structured Streaming UI graphs URL: https://github.com/apache/spark/pull/27687#discussion_r383562905 ########## File path: sql/core/src/main/scala/org/apache/spark/sql/streaming/ui/StreamingQueryStatisticsPage.scala ########## @@ -70,11 +70,30 @@ private[ui] class StreamingQueryStatisticsPage(parent: StreamingQueryTab) } - def generateVar(values: Array[(Long, ju.Map[String, JLong])]): Seq[Node] = { + def generateTimeTipStrings(values: Array[(Long, Long)]): Seq[Node] = { + val js = "var timeTipStrings = {};\n" + values.map { case (batchId, time) => + val formattedTime = SparkUIUtils.formatBatchTime(time, 1, showYYYYMMSS = false) + s"timeTipStrings[$time] = 'batch $batchId ($formattedTime)';" + }.mkString("\n") + + + } + + def generateFormattedTimeTipStrings(values: Array[(Long, Long)]): Seq[Node] = { Review comment: This is for the input of `structured streaming js`. ---------------------------------------------------------------- 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: users@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org