From issues-return-185989-archive-asf-public=cust-asf.ponee.io@spark.apache.org Wed Feb 28 20:49:04 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 12E09180671 for ; Wed, 28 Feb 2018 20:49:03 +0100 (CET) Received: (qmail 32585 invoked by uid 500); 28 Feb 2018 19:49:03 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 32574 invoked by uid 99); 28 Feb 2018 19:49:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Feb 2018 19:49:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8D6E61800EA for ; Wed, 28 Feb 2018 19:49:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 0UuP3WhTG-RL for ; Wed, 28 Feb 2018 19:49:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 699245F3B8 for ; Wed, 28 Feb 2018 19:49:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D0604E0383 for ; Wed, 28 Feb 2018 19:49:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 43E0A2412F for ; Wed, 28 Feb 2018 19:49:00 +0000 (UTC) Date: Wed, 28 Feb 2018 19:49:00 +0000 (UTC) From: "Sital Kedia (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-23502) Support async init of spark context during spark-shell startup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-23502?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D163= 80942#comment-16380942 ]=20 Sital Kedia commented on SPARK-23502: ------------------------------------- >>=C2=A0what happens when you operate on=C2=A0{{sc}}=C2=A0before it's initi= alized? We will wait for the future to complete before triggering any action based = on user input, so that should be fine. >>=C2=A0Is it surprising if Spark shell starts but errors out 20 seconds la= ter?=C2=A0 Yes, that might be one of the side effects.=C2=A0 Another major side effect= as I mentioned is not able to print the messages like UI link and app id w= hen the spark-shell starts. =C2=A0 I just wanted to get some opinion to see if this is something useful for th= e community. If we do not think so, we can close this. =C2=A0 =C2=A0 =C2=A0 > Support async init of spark context during spark-shell startup > -------------------------------------------------------------- > > Key: SPARK-23502 > URL: https://issues.apache.org/jira/browse/SPARK-23502 > Project: Spark > Issue Type: Improvement > Components: Spark Shell > Affects Versions: 2.0.0 > Reporter: Sital Kedia > Priority: Minor > > Currently, whenever a user starts the spark shell, we initialize the spar= k context before returning the prompt to the user. In environments, where s= park context initialization takes several seconds, it is not a very good us= er experience for the user to wait for the prompt. Instead of waiting for t= he initialization of spark context, we can initialize it in the background = while we return the=C2=A0prompt to the user as soon as possible. Please not= e that even if we return the prompt to the user soon, we still need to make= sure to wait for the spark context initialization to complete before any q= uery is executed.=C2=A0 > Please note that the scala interpreter already does very similar async in= itialization in order to return the prompt to the user faster - https://git= hub.com/scala/scala/blob/v2.12.2/src/repl/scala/tools/nsc/interpreter/ILoop= .scala#L414. We will be emulating the behavior for Spark.=C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org