{"push_id":1407055884,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"5e85e6ea6ff004735fde9bef58085b83369f864b","before":"e0930570df6bfeefb4f283f6624ce2ce6caf0fe0","commits":[{"sha":"5e85e6ea6ff004735fde9bef58085b83369f864b","author":{"name":"Anthony Corbacho","email":"97b7fcd2b0a62e09e897ab5e64f9431830ee4621@gmail.com"},"message":"[ZEPPELIN-1610] - Add notebook watcher\n\n### What is this PR for?\nAdd a Simple way to switch a websocket connection to a new state; watcher.\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.\n\n### What type of PR is it?\n[Feature]\n\n### Todos\n* [x] - Add watcher Queue\n* [x] - Add endpoint to switch from regular client to watcher\n* [x] - Add a way to generate a uniq key when zeppelin server restart\n* [x] - Add example on how to use watcher.\n\n### What is the Jira issue?\n* [ZEPPELIN-1610](https://issues.apache.org/jira/browse/ZEPPELIN-1610)\n\n### How should this be tested?\nYou will have to create your own websocket client and provide a valid http header (`X-Watcher-Key`) when you connect to zeppelin ws\n something like\n```\nprivate Session openWatcherSession() {\n    ClientUpgradeRequest request = new ClientUpgradeRequest();\n    request.setHeader(WatcherSecurityKey.HTTP_HEADER, WatcherSecurityKey.getKey());\n    WatcherWebsocket socket = WatcherWebsocket.createInstace();\n    Future<Session> future = null;\n    Session session = null;\n    try {\n      future = wsClient.connect(socket, zeppelinWebsocketUrl, request);\n      session = future.get();\n    } catch (IOException | InterruptedException | ExecutionException e) {\n      LOG.error(\"Couldn't establish websocket connection to Zeppelin \", e);\n      return session;\n    }\n    return session;\n  }\n```\n\n### Screenshots (if appropriate)\n\n### Questions:\n* Does the licenses files need update? No\n* Is there breaking changes for older versions? No\n* Does this needs documentation? Yes\n\nAuthor: Anthony Corbacho <corbacho.anthony@gmail.com>\n\nCloses #1588 from anthonycorbacho/feat/updateWebsocketInZeppelinHubRepo and squashes the following commits:\n\n26cf53f [Anthony Corbacho] Move broadcastToWatcher\n8413e9b [Anthony Corbacho] Remove redundant broadcast\nfb2c260 [Anthony Corbacho] Remove TODO in socket/Message\n716c92c [Anthony Corbacho] Fix checkstyle\na10ba13 [Anthony Corbacho] Add remove connection from note back in test\n89d70f2 [Anthony Corbacho] fix test\n092791e [Anthony Corbacho] Light refactoring :: add missing header, add comment, refacto some methods\n8f7e1b3 [Anthony Corbacho] Add X-Watcher-Key in request header for watcher client\ne2d3053 [Anthony Corbacho] Add simple check for ws before switching ws client to watcher, client should provide a header X-Watcher-Key with a valid key (generated at runtime), if key invalid client wont be accepted\ne25ea1e [Anthony Corbacho] Add simple Key generation for Watcher ws client\n4affe25 [Anthony Corbacho] Handle remoing wssession from notebook map once the session is close :: avoiding socket connection to be ide\nc32192a [Anthony Corbacho] rework watcher creation and ws session with notes\n3bd3482 [Anthony Corbacho] Reorder import :: Google check style\nbde5db4 [Anthony Corbacho] Update ping routine\nede1f18 [Anthony Corbacho] make private field public for accessibility\naa55a5a [Anthony Corbacho] Strting to rework ZeppelinClient\ne5b3a1d [Anthony Corbacho] Add zeppelinhub notebook watcher\n9d6c93f [Anthony Corbacho] Add new OP watcher\n0d7f493 [Anthony Corbacho] Added new WS queue called watcher, watcher will be abler to listen to almost every note action performed in zeppelin notebook websocket server\n45849ce [Anthony Corbacho] Add new message type :: Watcher message, this class will wrapp zeppelin ws message and add extra information such as noteId and user","distinct":true,"url":"https://api.github.com/repos/fogbeam/zeppelin_mirror/commits/5e85e6ea6ff004735fde9bef58085b83369f864b"}]}
{"actor":{"display_login":"mindcrime"}}