Uploaded image for project: 'Livy'
  1. Livy
  2. LIVY-41

Need a way to submit codes through Named Session instead of Session ID numbers

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.1
    • 0.6.0
    • Core
    • None

    Description

      Currently, we are creating new pyspark session and submitting codes through newly created session id as below
      curl -X POST --data '

      {"kind": "pyspark", "queue": "spark", "name": "Livy_Example"}

      ' -H "Content-Type: application/json" localhost:8998/sessions
      curl localhost:8998/sessions/1/statements -X POST -H 'Content-Type: application/json' -d '

      {"code":"1 + 1"}

      '
      But, it would be nice if we have a way to submit the codes through session name instead of session id. That way, we need not to maintain a lookup table for session-id to session-name. Users will be able to submit their codes easily as below through session names instead of worrying about session id.
      curl -X POST --data '

      {"kind": "pyspark", "queue": "spark", "name": "mkt_risk_batch"}

      ' -H "Content-Type: application/json" localhost:8998/sessions
      curl localhost:8998/sessions/mkt_risk_batch/statements -X POST -H 'Content-Type: application/json' -d '

      {"code":"1 + 1"}

      '

      Attachments

        Activity

          People

            meisam Meisam
            prabhu1984 Prabhu Kasinathan
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 5h 10m
                5h 10m