Github user sanjay-saxena commented on a diff in the pull request:

    https://github.com/apache/incubator-toree/pull/147#discussion_r152348081
  
    --- Diff: kernel/src/main/scala/org/apache/toree/kernel/api/Kernel.scala ---
    @@ -403,15 +403,17 @@ class Kernel (
           case Some(master) if !master.contains("local") =>
             // when connecting to a remote cluster, the first call to 
getOrCreate
             // may create a session and take a long time, so this starts a 
future
    -        // to get the session. if it take longer than 100 ms, then print a
    +        // to get the session. if it take longer than specified timeout, 
then print a
             // message to the user that Spark is starting.
             import scala.concurrent.ExecutionContext.Implicits.global
             val sessionFuture = Future {
               SparkSession.builder.config(defaultSparkConf).getOrCreate
             }
     
             try {
    -          Await.result(sessionFuture, Duration(100, TimeUnit.MILLISECONDS))
    +          val timeout = 
config.getInt("spark_context_intialization_timeout")
    --- End diff --
    
    Sounds good.


---

Reply via email to