{"action":"created","issue":{"url":"https://api.github.com/repos/apache/storm/issues/1742","repository_url":"https://api.github.com/repos/apache/storm","labels_url":"https://api.github.com/repos/apache/storm/issues/1742/labels{/name}","comments_url":"https://api.github.com/repos/apache/storm/issues/1742/comments","events_url":"https://api.github.com/repos/apache/storm/issues/1742/events","html_url":"https://github.com/apache/storm/pull/1742","id":184492077,"number":1742,"title":"STORM-2170 [Storm SQL] Add built-in socket datasource to runtime","user":{"login":"HeartSaVioR","id":1317309,"avatar_url":"https://avatars.githubusercontent.com/u/1317309?v=3","gravatar_id":"","url":"https://api.github.com/users/HeartSaVioR","html_url":"https://github.com/HeartSaVioR","followers_url":"https://api.github.com/users/HeartSaVioR/followers","following_url":"https://api.github.com/users/HeartSaVioR/following{/other_user}","gists_url":"https://api.github.com/users/HeartSaVioR/gists{/gist_id}","starred_url":"https://api.github.com/users/HeartSaVioR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HeartSaVioR/subscriptions","organizations_url":"https://api.github.com/users/HeartSaVioR/orgs","repos_url":"https://api.github.com/users/HeartSaVioR/repos","events_url":"https://api.github.com/users/HeartSaVioR/events{/privacy}","received_events_url":"https://api.github.com/users/HeartSaVioR/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-21T13:59:17Z","updated_at":"2016-11-17T13:26:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/storm/pulls/1742","html_url":"https://github.com/apache/storm/pull/1742","diff_url":"https://github.com/apache/storm/pull/1742.diff","patch_url":"https://github.com/apache/storm/pull/1742.patch"},"body":"- Add Socket datasource (input/output) in storm-sql-runtime module\n  - only for test purpose, no guarantee\n- scheme: 'socket'\n\nSince Socket datasource is in storm-sql-runtime, it's registered to DataSourcesProvider by default.\nSo below SQL statements doesn't need any external artifacts at all and can be executed to below command:\n\n```\n./bin/storm sql apache_log_error_filtering_socket.sql apache_log_error_filtering_socket\n```\n\n```\nCREATE EXTERNAL TABLE APACHE_LOGS (ID INT PRIMARY KEY, REMOTE_IP VARCHAR, REQUEST_URL VARCHAR, REQUEST_METHOD VARCHAR, STATUS VARCHAR, REQUEST_HEADER_USER_AGENT VARCHAR, TIME_RECEIVED_UTC_ISOFORMAT VARCHAR, TIME_US DOUBLE) LOCATION 'socket://localhost:8889'\nCREATE EXTERNAL TABLE APACHE_ERROR_LOGS (ID INT PRIMARY KEY, REMOTE_IP VARCHAR, REQUEST_URL VARCHAR, REQUEST_METHOD VARCHAR, STATUS INT, REQUEST_HEADER_USER_AGENT VARCHAR, TIME_RECEIVED_UTC_ISOFORMAT VARCHAR, TIME_ELAPSED_MS INT) LOCATION 'socket://localhost:8890'\nINSERT INTO APACHE_ERROR_LOGS SELECT ID, REMOTE_IP, REQUEST_URL, REQUEST_METHOD, CAST(STATUS AS INT) AS STATUS_INT, REQUEST_HEADER_USER_AGENT, TIME_RECEIVED_UTC_ISOFORMAT, (TIME_US / 1000) AS TIME_ELAPSED_MS FROM APACHE_LOGS WHERE (CAST(STATUS AS INT) / 100) >= 4\n```\n\nManually tested via opening tcp servers via netcat.\n"},"comment":{"url":"https://api.github.com/repos/apache/storm/issues/comments/261245669","html_url":"https://github.com/apache/storm/pull/1742#issuecomment-261245669","issue_url":"https://api.github.com/repos/apache/storm/issues/1742","id":261245669,"user":{"login":"vesense","id":6711230,"avatar_url":"https://avatars.githubusercontent.com/u/6711230?v=3","gravatar_id":"","url":"https://api.github.com/users/vesense","html_url":"https://github.com/vesense","followers_url":"https://api.github.com/users/vesense/followers","following_url":"https://api.github.com/users/vesense/following{/other_user}","gists_url":"https://api.github.com/users/vesense/gists{/gist_id}","starred_url":"https://api.github.com/users/vesense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vesense/subscriptions","organizations_url":"https://api.github.com/users/vesense/orgs","repos_url":"https://api.github.com/users/vesense/repos","events_url":"https://api.github.com/users/vesense/events{/privacy}","received_events_url":"https://api.github.com/users/vesense/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T13:26:14Z","updated_at":"2016-11-17T13:26:14Z","body":"Thanks @HeartSaVioR LGTM +1 Just left several comments."}}
{"actor":{"display_login":"vesense"}}