You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Puneet Gupta (JIRA)" <ji...@apache.org> on 2016/09/15 07:02:20 UTC

[jira] [Commented] (LENS-1190) Support Query End Notifictaion to a HTTP end point.

    [ https://issues.apache.org/jira/browse/LENS-1190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15492592#comment-15492592 ] 

Puneet Gupta commented on LENS-1190:
------------------------------------

Used lens server itself as a end point.
lens-shell>set lens.query.http.notification.type.FINISHED=true
Set param succeeded
lens-shell>set lens.query.http.notification.urls=http://192.168.138.184:9999/lensapi/
Set param succeeded
lens-shell>cube select id,name from sample_db_dim --async

{noformat}
57 > content-type: multipart/form-data;boundary=Boundary_1_1827494839_1472030457696
57 > host: 192.168.138.184:9999
57 > mime-version: 1.0
57 > user-agent: Jersey/2.22.1 (HttpUrlConnection 1.8.0_40)
--Boundary_1_1827494839_1472030457696
Content-Type: application/json
Content-Disposition: form-data; name="query"

{
   "lensQuery" : {
      "queryHandle" : {
         "handleId" : "40f404e8-ea4d-4335-a683-8c95c123dfc7"
      },
      "userQuery" : "cube select id,name from sample_db_dim",
      "submittedUser" : "anonymous",
      "priority" : "NORMAL",
      "isPersistent" : true,
      "selectedDriverName" : "jdbc/jdbc1",
      "driverQuery" : "SELECT (sample_db_dim.id), (sample_db_dim.name) FROM exp_yoda.mydb_dim_table3 sample_db_dim",
      "status" : {
         "progress" : 1.0,
         "status" : "SUCCESSFUL",
         "statusMessage" : "Query is successful!",
         "isResultSetAvailable" : true
      },
      "resultSetPath" : "hdfs://192.168.138.184:8020/tmp/lensreports/40f404e8-ea4d-4335-a683-8c95c123dfc7.zip",
      "queryConf" : {
      },
      "submissionTime" : 1472030435326,
      "launchTime" : 1472030435679,
      "driverStartTime" : 1472030435679,
      "driverFinishTime" : 1472030435720,
      "finishTime" : 1472030457590,
      "closedTime" : 0,
      "queryName" : ""
   }
}
--Boundary_1_1827494839_1472030457696
Content-Type: text/plain
Content-Disposition: form-data; name="eventtype"

FINISHED
--Boundary_1_1827494839_1472030457696
Content-Type: text/plain
Content-Disposition: form-data; name="eventtime"

1472030457590
--Boundary_1_1827494839_1472030457696--
{noformat}

> Support Query End Notifictaion to a HTTP end point.
> ---------------------------------------------------
>
>                 Key: LENS-1190
>                 URL: https://issues.apache.org/jira/browse/LENS-1190
>             Project: Apache Lens
>          Issue Type: New Feature
>          Components: server
>            Reporter: Puneet Gupta
>            Assignee: Puneet Gupta
>             Fix For: 2.7
>
>         Attachments: lens-1190.patch
>
>
> As of now query end notification is supported via email. 
> On similar lines we can also notify a HTTP end point and the app submitting queries on Lens Server can take appropriate action when such a end notification is received by it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)