askhatri commented on code in PR #384:
URL: https://github.com/apache/incubator-livy/pull/384#discussion_r1094126344
##########
server/src/main/scala/org/apache/livy/server/interactive/InteractiveSessionServlet.scala:
##########
@@ -52,15 +53,20 @@ class InteractiveSessionServlet(
override protected def createSession(req: HttpServletRequest):
InteractiveSession = {
val createRequest = bodyAs[CreateInteractiveRequest](req)
- InteractiveSession.create(
- sessionManager.nextId(),
- createRequest.name,
- remoteUser(req),
- proxyUser(req, createRequest.proxyUser),
- livyConf,
- accessManager,
- createRequest,
- sessionStore)
+ if (ClientConf.validateTtl(createRequest.ttl.orNull)) {
+ InteractiveSession.create(
+ sessionManager.nextId(),
+ createRequest.name,
+ remoteUser(req),
+ proxyUser(req, createRequest.proxyUser),
+ livyConf,
+ accessManager,
+ createRequest,
+ sessionStore,
+ createRequest.ttl)
+ } else {
+ null
Review Comment:
I have fixed this by adding logic to throw an error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]