{"action":"created","issue":{"url":"https://api.github.com/repos/apache/zeppelin/issues/1588","repository_url":"https://api.github.com/repos/apache/zeppelin","labels_url":"https://api.github.com/repos/apache/zeppelin/issues/1588/labels{/name}","comments_url":"https://api.github.com/repos/apache/zeppelin/issues/1588/comments","events_url":"https://api.github.com/repos/apache/zeppelin/issues/1588/events","html_url":"https://github.com/apache/zeppelin/pull/1588","id":187002316,"number":1588,"title":"[ZEPPELIN-1610] [WIP] - Add notebook watcher","user":{"login":"anthonycorbacho","id":3139557,"avatar_url":"https://avatars.githubusercontent.com/u/3139557?v=3","gravatar_id":"","url":"https://api.github.com/users/anthonycorbacho","html_url":"https://github.com/anthonycorbacho","followers_url":"https://api.github.com/users/anthonycorbacho/followers","following_url":"https://api.github.com/users/anthonycorbacho/following{/other_user}","gists_url":"https://api.github.com/users/anthonycorbacho/gists{/gist_id}","starred_url":"https://api.github.com/users/anthonycorbacho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthonycorbacho/subscriptions","organizations_url":"https://api.github.com/users/anthonycorbacho/orgs","repos_url":"https://api.github.com/users/anthonycorbacho/repos","events_url":"https://api.github.com/users/anthonycorbacho/events{/privacy}","received_events_url":"https://api.github.com/users/anthonycorbacho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-03T08:43:09Z","updated_at":"2016-11-07T07:59:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/zeppelin/pulls/1588","html_url":"https://github.com/apache/zeppelin/pull/1588","diff_url":"https://github.com/apache/zeppelin/pull/1588.diff","patch_url":"https://github.com/apache/zeppelin/pull/1588.patch"},"body":"### What is this PR for?\r\nAdd a Simple way to switch a websocket connection to a new state; watcher.\r\nA websocket watcher is a special connection that will watch most of the web socket even in Zeppelin, this cam be used to monitor zeppelin server activity.\r\n\r\n### What type of PR is it?\r\n[Feature]\r\n\r\n### Todos\r\n* [x] - Add watcher Queue\r\n* [x] - Add endpoint to switch from regular client to watcher\r\n* [x] - Add a way to generate a uniq key when zeppelin server restart\r\n* [x] - Add example on how to use watcher.\r\n\r\n### What is the Jira issue?\r\n* [ZEPPELIN-1610](https://issues.apache.org/jira/browse/ZEPPELIN-1610)\r\n\r\n### How should this be tested?\r\nYou will have to create your own websocket client and provide a valid http header (`X-Watcher-Key`) when you connect to zeppelin ws\r\n something like \r\n```\r\nprivate Session openWatcherSession() {\r\n    ClientUpgradeRequest request = new ClientUpgradeRequest();\r\n    request.setHeader(WatcherSecurityKey.HTTP_HEADER, WatcherSecurityKey.getKey());\r\n    WatcherWebsocket socket = WatcherWebsocket.createInstace();\r\n    Future<Session> future = null;\r\n    Session session = null;\r\n    try {\r\n      future = wsClient.connect(socket, zeppelinWebsocketUrl, request);\r\n      session = future.get();\r\n    } catch (IOException | InterruptedException | ExecutionException e) {\r\n      LOG.error(\"Couldn't establish websocket connection to Zeppelin \", e);\r\n      return session;\r\n    }\r\n    return session;\r\n  }\r\n```\r\n\r\n### Screenshots (if appropriate)\r\n\r\n### Questions:\r\n* Does the licenses files need update? No\r\n* Is there breaking changes for older versions? No\r\n* Does this needs documentation? Yes\r\n"},"comment":{"url":"https://api.github.com/repos/apache/zeppelin/issues/comments/258768955","html_url":"https://github.com/apache/zeppelin/pull/1588#issuecomment-258768955","issue_url":"https://api.github.com/repos/apache/zeppelin/issues/1588","id":258768955,"user":{"login":"khalidhuseynov","id":1642088,"avatar_url":"https://avatars.githubusercontent.com/u/1642088?v=3","gravatar_id":"","url":"https://api.github.com/users/khalidhuseynov","html_url":"https://github.com/khalidhuseynov","followers_url":"https://api.github.com/users/khalidhuseynov/followers","following_url":"https://api.github.com/users/khalidhuseynov/following{/other_user}","gists_url":"https://api.github.com/users/khalidhuseynov/gists{/gist_id}","starred_url":"https://api.github.com/users/khalidhuseynov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khalidhuseynov/subscriptions","organizations_url":"https://api.github.com/users/khalidhuseynov/orgs","repos_url":"https://api.github.com/users/khalidhuseynov/repos","events_url":"https://api.github.com/users/khalidhuseynov/events{/privacy}","received_events_url":"https://api.github.com/users/khalidhuseynov/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T07:59:00Z","updated_at":"2016-11-07T07:59:00Z","body":"@anthonycorbacho thanks for contribution. as far as i can see, this is kind of promiscuous mode for websockets. @Leemoonsoo any comments? Also maybe remove `WIP` from title"}}
{"actor":{"display_login":"khalidhuseynov"}}