Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-20440

Allow SparkR session and context to have delayed binding

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Workaround
    • 2.1.0
    • None
    • SparkR
    • None

    Description

      It would be useful if users could do something like this without first invoking sparkR.session():

      delayedAssign(".sparkRsession", { sparkR.session(..) }, assign.env=SparkR:::.sparkREnv)
      

      This would help providers of interactive environments that bootstrap Spark for their users but where, the user code need not always include SparkR. So the possibility of lazy semantics for setting up a SparkSession/Context would be very useful.

      Note that SparkR API does not have a single entry object (such as Scala/Python SparkSession classes) so it's the only env where such lazy setup is currently difficult to achieve, so doing this enhancement will make it easier.

      The changes required are minor and do not affect the external API or functionality in any way. I will attach a PR with the changes needed for consideration shortly.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vijoshi Vinayak Joshi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: