Re: user defined sessionId / URI for Livy sessions

2017-09-11 Thread Saisai Shao
I see. So based on this, we should manage a data structure in Livy Server
to keep all the live sessions' name. Also regarding to session recovery, we
should persist this structure to the reliable storage and recover after
restart.

I'm not pretty sure if it is a good feature or not. First because we
usually programmatically manage the session id, so from code level to
manager a session id or a session name there's no much difference; second,
usually it is hard for user to pick a unique name if one Livy Server has
many live sessions, by large chance the name will be conflicted, people
always like short, simple name.

Since I'm so familiar how people really use it, so it is just my two cents.

Thanks
Jerry


On Tue, Sep 12, 2017 at 8:46 AM, Meisam Fathi 
wrote:

> > If we're using session name, how do we guarantee the uniqueness of this
> > name?
> >
>
> If the requested session name already exist, Livy returns an error and does
> not create the session.
>
> Thanks,
> Meisam
>


Re: user defined sessionId / URI for Livy sessions

2017-09-11 Thread Meisam Fathi
> If we're using session name, how do we guarantee the uniqueness of this
> name?
>

If the requested session name already exist, Livy returns an error and does
not create the session.

Thanks,
Meisam


Re: user defined sessionId / URI for Livy sessions

2017-09-11 Thread Saisai Shao
If we're using session name, how do we guarantee the uniqueness of this
name?

Thanks
Jerry

On Tue, Sep 12, 2017 at 4:51 AM, Alex Bozarth  wrote:

> I would agree with Marcelo's comment the JIRA that this isn't a good
> feature for livy, but I'll take a look at your impl if you open a PR and
> see if it changes my mind.
>
>
> *Alex Bozarth*
> Software Engineer
> Spark Technology Center
> --
> *E-mail:* *ajboz...@us.ibm.com* 
> *GitHub: **github.com/ajbozarth* 
>
>
> 505 Howard Street
> 
> San Francisco, CA 94105
> 
> United States
> 
>
>
>
> [image: Inactive hide details for Meisam Fathi ---09/11/2017 10:23:49
> AM---+ dev Is there any interest in adding this feature to Livy?]Meisam
> Fathi ---09/11/2017 10:23:49 AM---+ dev Is there any interest in adding
> this feature to Livy? I can send a PR
>
> From: Meisam Fathi 
> To: "u...@livy.incubator.apache.org" , "
> dev@livy.incubator.apache.org" 
> Date: 09/11/2017 10:23 AM
> Subject: Re: user defined sessionId / URI for Livy sessions
> --
>
>
>
> + dev
> Is there any interest in adding this feature to Livy? I can send a PR
>
> Ideally, it would be helpful if we could mint a session ID with a PUT
> > request, something like PUT /sessions/foobar, where "foobar" is the newly
> > created sessionId.
> >
> > I suggest we make session names unique and nonnumeric values (to
> guarantee
> a session name does not clash with another session name or session ID).
>
> Design doc:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.
> com_meisam_incubator-2Dlivy_wiki_Design-2Ddoc-2Dfor-
> 2DLivy-2D41-3A-2DAccessing-2Dsessions-2Dby-2Dname&d=
> DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=S1_S7Dymu4ZL6g7L21O78VQZ53vEnAyZ-
> cx37DPYDyo&m=bUJg_csAaA5f2DPiMkjU-juQkf5Q2FMYtA5kv5sqiMM&s=
> xTiY52FMWMdTRgCmiNRWe6yEoCchxKNxQrYPEkPupbw&e=
> JIRA ticket: https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.
> apache.org_jira_browse_LIVY-2D41&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=S1_
> S7Dymu4ZL6g7L21O78VQZ53vEnAyZ-cx37DPYDyo&m=bUJg_csAaA5f2DPiMkjU-
> juQkf5Q2FMYtA5kv5sqiMM&s=lFed2hYlDA_wUo94RWUAw7N01lSN368P-ABmP_npWrM&e=
>
>
> Thanks,
> Meisam
>
>
>
>


Re: user defined sessionId / URI for Livy sessions

2017-09-11 Thread Alex Bozarth

I would agree with Marcelo's comment the JIRA that this isn't a good
feature for livy, but I'll take a look at your impl if you open a PR and
see if it changes my mind.


   
 Alex Bozarth   
   
 Software Engineer  
   
 Spark Technology Center
   

   

 

 

 
 E-mail: ajboz...@us.ibm.com
 
 GitHub: github.com/ajbozarth   
 
   505 Howard 
Street 
 San Francisco, CA 
94105 
   United 
States 

 








From:   Meisam Fathi 
To: "u...@livy.incubator.apache.org"
,
"dev@livy.incubator.apache.org" 
Date:   09/11/2017 10:23 AM
Subject:Re: user defined sessionId / URI for Livy sessions



+ dev
Is there any interest in adding this feature to Livy? I can send a PR

Ideally, it would be helpful if we could mint a session ID with a PUT
> request, something like PUT /sessions/foobar, where "foobar" is the newly
> created sessionId.
>
> I suggest we make session names unique and nonnumeric values (to
guarantee
a session name does not clash with another session name or session ID).

Design doc:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_meisam_incubator-2Dlivy_wiki_Design-2Ddoc-2Dfor-2DLivy-2D41-3A-2DAccessing-2Dsessions-2Dby-2Dname&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=S1_S7Dymu4ZL6g7L21O78VQZ53vEnAyZ-cx37DPYDyo&m=bUJg_csAaA5f2DPiMkjU-juQkf5Q2FMYtA5kv5sqiMM&s=xTiY52FMWMdTRgCmiNRWe6yEoCchxKNxQrYPEkPupbw&e=

JIRA ticket:
https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_LIVY-2D41&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=S1_S7Dymu4ZL6g7L21O78VQZ53vEnAyZ-cx37DPYDyo&m=bUJg_csAaA5f2DPiMkjU-juQkf5Q2FMYtA5kv5sqiMM&s=lFed2hYlDA_wUo94RWUAw7N01lSN368P-ABmP_npWrM&e=



Thanks,
Meisam




Re: user defined sessionId / URI for Livy sessions

2017-09-11 Thread Meisam Fathi
+ dev
Is there any interest in adding this feature to Livy? I can send a PR

Ideally, it would be helpful if we could mint a session ID with a PUT
> request, something like PUT /sessions/foobar, where "foobar" is the newly
> created sessionId.
>
> I suggest we make session names unique and nonnumeric values (to guarantee
a session name does not clash with another session name or session ID).

Design doc:
https://github.com/meisam/incubator-livy/wiki/Design-doc-for-Livy-41:-Accessing-sessions-by-name
JIRA ticket: https://issues.apache.org/jira/browse/LIVY-41


Thanks,
Meisam