{"action":"created","comment":{"url":"https://api.github.com/repos/apache/pulsar/pulls/comments/244557571","pull_request_review_id":188464690,"id":244557571,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDU1NzU3MQ==","diff_hunk":"@@ -131,10 +124,11 @@ protected void process() {\n                 connector.subscribe();\n                 while (running) {\n                     Message message = connector.getWithoutAck(canalSourceConfig.getBatchSize());\n-                    // delete the setRaw in new version of canal-client\n                     message.setRaw(false);\n-                    List<FlatMessage> flatMessages = FlatMessage.messageConverter(message);\n-                    long batchId = message.getId();\n+                    SimpleCanalConnector con = (SimpleCanalConnector) connector;\n+                    con.isLazyParseEntry();","path":"pulsar-io/canal/src/main/java/org/apache/pulsar/io/canal/CanalAbstractSource.java","position":52,"original_position":52,"commit_id":"b08d137819ce9cda7737062b8a2096349ae7034c","original_commit_id":"b08d137819ce9cda7737062b8a2096349ae7034c","user":{"login":"sijie","id":1217863,"node_id":"MDQ6VXNlcjEyMTc4NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1217863?v=4","gravatar_id":"","url":"https://api.github.com/users/sijie","html_url":"https://github.com/sijie","followers_url":"https://api.github.com/users/sijie/followers","following_url":"https://api.github.com/users/sijie/following{/other_user}","gists_url":"https://api.github.com/users/sijie/gists{/gist_id}","starred_url":"https://api.github.com/users/sijie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sijie/subscriptions","organizations_url":"https://api.github.com/users/sijie/orgs","repos_url":"https://api.github.com/users/sijie/repos","events_url":"https://api.github.com/users/sijie/events{/privacy}","received_events_url":"https://api.github.com/users/sijie/received_events","type":"User","site_admin":false},"body":"I am not very familiar with Canal. does `isLazyParseEntry()` changing the state of the connector, so the `con` will parse entries lazily?","created_at":"2018-12-31T06:47:14Z","updated_at":"2018-12-31T06:49:08Z","html_url":"https://github.com/apache/pulsar/pull/3268#discussion_r244557571","pull_request_url":"https://api.github.com/repos/apache/pulsar/pulls/3268","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/pulsar/pulls/comments/244557571"},"html":{"href":"https://github.com/apache/pulsar/pull/3268#discussion_r244557571"},"pull_request":{"href":"https://api.github.com/repos/apache/pulsar/pulls/3268"}}},"pull_request":{"url":"https://api.github.com/repos/apache/pulsar/pulls/3268","id":241528664,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNTI4NjY0","html_url":"https://github.com/apache/pulsar/pull/3268","diff_url":"https://github.com/apache/pulsar/pull/3268.diff","patch_url":"https://github.com/apache/pulsar/pull/3268.patch","issue_url":"https://api.github.com/repos/apache/pulsar/issues/3268","number":3268,"state":"open","locked":false,"title":"Optimization of binlog to pulsar use canal","user":{"login":"tuteng","id":1907867,"node_id":"MDQ6VXNlcjE5MDc4Njc=","avatar_url":"https://avatars2.githubusercontent.com/u/1907867?v=4","gravatar_id":"","url":"https://api.github.com/users/tuteng","html_url":"https://github.com/tuteng","followers_url":"https://api.github.com/users/tuteng/followers","following_url":"https://api.github.com/users/tuteng/following{/other_user}","gists_url":"https://api.github.com/users/tuteng/gists{/gist_id}","starred_url":"https://api.github.com/users/tuteng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuteng/subscriptions","organizations_url":"https://api.github.com/users/tuteng/orgs","repos_url":"https://api.github.com/users/tuteng/repos","events_url":"https://api.github.com/users/tuteng/events{/privacy}","received_events_url":"https://api.github.com/users/tuteng/received_events","type":"User","site_admin":false},"body":"### Motivation\r\n\r\nOptimization of mysql binlog to pulsar use canal\r\n\r\n### Modifications\r\n\r\nAdd MessageUtils for parse columns\r\nSupport query of presto sql\r\n\r\n### Result\r\n\r\n#### INSERT\r\nmysql:\r\n```\r\nMariaDB [aaa]> insert into users321(name, extra) values('xxxddxxxmm', 'ddd');\r\n```\r\npython consumer:\r\n```\r\n{u'timestamp': u'2018-12-31 00:31:24', u'message': u'[{\"data\":null,\"database\":\"\",\"es\":1546234283000,\"id\":58,\"isDdl\":false,\"mysqlType\":null,\"old\":null,\"sql\":\"insert into users321(name, extra) values(\\'xxxddxxxmm\\', \\'ddd\\')\",\"sqlType\":null,\"table\":\"\",\"ts\":1546234284669,\"type\":\"QUERY\"},{\"data\":[{\"isKey\":\"1\",\"isNull\":\"0\",\"index\":\"0\",\"mysqlType\":\"int(11)\",\"columnName\":\"id\",\"columnValue\":\"34\",\"updated\":\"1\"},{\"isKey\":\"0\",\"isNull\":\"0\",\"index\":\"1\",\"mysqlType\":\"varchar(50)\",\"columnName\":\"name\",\"columnValue\":\"xxxddxxxmm\",\"updated\":\"1\"},{\"isKey\":\"0\",\"isNull\":\"0\",\"index\":\"2\",\"mysqlType\":\"varchar(50)\",\"columnName\":\"extra\",\"columnValue\":\"ddd\",\"updated\":\"1\"}],\"database\":\"aaa\",\"es\":1546234283000,\"id\":58,\"isDdl\":false,\"mysqlType\":null,\"old\":null,\"sql\":\"\",\"sqlType\":null,\"table\":\"users321\",\"ts\":1546234284670,\"type\":\"INSERT\"}]', u'id': 58}\r\n```\r\npresto sql:\r\n```\r\npresto> select id, timestamp, message from pulsar.\"public/default\".my_topic_test where id=58;\r\n id |      timestamp      |\r\n----+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\r\n 58 | 2018-12-31 00:31:24 | [{\"data\":null,\"database\":\"\",\"es\":1546234283000,\"id\":58,\"isDdl\":false,\"mysqlType\":null,\"old\":null,\"sql\":\"insert into users321(name, extra) values('xxxddxxxmm', 'ddd')\",\"sqlType\"\r\n```\r\n\r\n","created_at":"2018-12-31T05:52:08Z","updated_at":"2018-12-31T06:49:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d482502e2f03ee6cf56fe1e7e602ffef9c0a9c10","assignee":{"login":"tuteng","id":1907867,"node_id":"MDQ6VXNlcjE5MDc4Njc=","avatar_url":"https://avatars2.githubusercontent.com/u/1907867?v=4","gravatar_id":"","url":"https://api.github.com/users/tuteng","html_url":"https://github.com/tuteng","followers_url":"https://api.github.com/users/tuteng/followers","following_url":"https://api.github.com/users/tuteng/following{/other_user}","gists_url":"https://api.github.com/users/tuteng/gists{/gist_id}","starred_url":"https://api.github.com/users/tuteng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuteng/subscriptions","organizations_url":"https://api.github.com/users/tuteng/orgs","repos_url":"https://api.github.com/users/tuteng/repos","events_url":"https://api.github.com/users/tuteng/events{/privacy}","received_events_url":"https://api.github.com/users/tuteng/received_events","type":"User","site_admin":false},"assignees":[{"login":"tuteng","id":1907867,"node_id":"MDQ6VXNlcjE5MDc4Njc=","avatar_url":"https://avatars2.githubusercontent.com/u/1907867?v=4","gravatar_id":"","url":"https://api.github.com/users/tuteng","html_url":"https://github.com/tuteng","followers_url":"https://api.github.com/users/tuteng/followers","following_url":"https://api.github.com/users/tuteng/following{/other_user}","gists_url":"https://api.github.com/users/tuteng/gists{/gist_id}","starred_url":"https://api.github.com/users/tuteng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuteng/subscriptions","organizations_url":"https://api.github.com/users/tuteng/orgs","repos_url":"https://api.github.com/users/tuteng/repos","events_url":"https://api.github.com/users/tuteng/events{/privacy}","received_events_url":"https://api.github.com/users/tuteng/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1025452684,"node_id":"MDU6TGFiZWwxMDI1NDUyNjg0","url":"https://api.github.com/repos/apache/pulsar/labels/component/io","name":"component/io","color":"1d76db","default":false},{"id":399568951,"node_id":"MDU6TGFiZWwzOTk1Njg5NTE=","url":"https://api.github.com/repos/apache/pulsar/labels/type/enhancement","name":"type/enhancement","color":"5319e7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apache/pulsar/pulls/3268/commits","review_comments_url":"https://api.github.com/repos/apache/pulsar/pulls/3268/comments","review_comment_url":"https://api.github.com/repos/apache/pulsar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/pulsar/issues/3268/comments","statuses_url":"https://api.github.com/repos/apache/pulsar/statuses/b08d137819ce9cda7737062b8a2096349ae7034c","head":{"label":"AmateurEvents:feature/abstract-canal-class","ref":"feature/abstract-canal-class","sha":"b08d137819ce9cda7737062b8a2096349ae7034c","user":{"login":"AmateurEvents","id":32859069,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODU5MDY5","avatar_url":"https://avatars1.githubusercontent.com/u/32859069?v=4","gravatar_id":"","url":"https://api.github.com/users/AmateurEvents","html_url":"https://github.com/AmateurEvents","followers_url":"https://api.github.com/users/AmateurEvents/followers","following_url":"https://api.github.com/users/AmateurEvents/following{/other_user}","gists_url":"https://api.github.com/users/AmateurEvents/gists{/gist_id}","starred_url":"https://api.github.com/users/AmateurEvents/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmateurEvents/subscriptions","organizations_url":"https://api.github.com/users/AmateurEvents/orgs","repos_url":"https://api.github.com/users/AmateurEvents/repos","events_url":"https://api.github.com/users/AmateurEvents/events{/privacy}","received_events_url":"https://api.github.com/users/AmateurEvents/received_events","type":"Organization","site_admin":false},"repo":{"id":155025443,"node_id":"MDEwOlJlcG9zaXRvcnkxNTUwMjU0NDM=","name":"pulsar","full_name":"AmateurEvents/pulsar","private":false,"owner":{"login":"AmateurEvents","id":32859069,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODU5MDY5","avatar_url":"https://avatars1.githubusercontent.com/u/32859069?v=4","gravatar_id":"","url":"https://api.github.com/users/AmateurEvents","html_url":"https://github.com/AmateurEvents","followers_url":"https://api.github.com/users/AmateurEvents/followers","following_url":"https://api.github.com/users/AmateurEvents/following{/other_user}","gists_url":"https://api.github.com/users/AmateurEvents/gists{/gist_id}","starred_url":"https://api.github.com/users/AmateurEvents/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmateurEvents/subscriptions","organizations_url":"https://api.github.com/users/AmateurEvents/orgs","repos_url":"https://api.github.com/users/AmateurEvents/repos","events_url":"https://api.github.com/users/AmateurEvents/events{/privacy}","received_events_url":"https://api.github.com/users/AmateurEvents/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/AmateurEvents/pulsar","description":"Apache Pulsar - distributed pub-sub messaging system","fork":true,"url":"https://api.github.com/repos/AmateurEvents/pulsar","forks_url":"https://api.github.com/repos/AmateurEvents/pulsar/forks","keys_url":"https://api.github.com/repos/AmateurEvents/pulsar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AmateurEvents/pulsar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AmateurEvents/pulsar/teams","hooks_url":"https://api.github.com/repos/AmateurEvents/pulsar/hooks","issue_events_url":"https://api.github.com/repos/AmateurEvents/pulsar/issues/events{/number}","events_url":"https://api.github.com/repos/AmateurEvents/pulsar/events","assignees_url":"https://api.github.com/repos/AmateurEvents/pulsar/assignees{/user}","branches_url":"https://api.github.com/repos/AmateurEvents/pulsar/branches{/branch}","tags_url":"https://api.github.com/repos/AmateurEvents/pulsar/tags","blobs_url":"https://api.github.com/repos/AmateurEvents/pulsar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AmateurEvents/pulsar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AmateurEvents/pulsar/git/refs{/sha}","trees_url":"https://api.github.com/repos/AmateurEvents/pulsar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AmateurEvents/pulsar/statuses/{sha}","languages_url":"https://api.github.com/repos/AmateurEvents/pulsar/languages","stargazers_url":"https://api.github.com/repos/AmateurEvents/pulsar/stargazers","contributors_url":"https://api.github.com/repos/AmateurEvents/pulsar/contributors","subscribers_url":"https://api.github.com/repos/AmateurEvents/pulsar/subscribers","subscription_url":"https://api.github.com/repos/AmateurEvents/pulsar/subscription","commits_url":"https://api.github.com/repos/AmateurEvents/pulsar/commits{/sha}","git_commits_url":"https://api.github.com/repos/AmateurEvents/pulsar/git/commits{/sha}","comments_url":"https://api.github.com/repos/AmateurEvents/pulsar/comments{/number}","issue_comment_url":"https://api.github.com/repos/AmateurEvents/pulsar/issues/comments{/number}","contents_url":"https://api.github.com/repos/AmateurEvents/pulsar/contents/{+path}","compare_url":"https://api.github.com/repos/AmateurEvents/pulsar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AmateurEvents/pulsar/merges","archive_url":"https://api.github.com/repos/AmateurEvents/pulsar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AmateurEvents/pulsar/downloads","issues_url":"https://api.github.com/repos/AmateurEvents/pulsar/issues{/number}","pulls_url":"https://api.github.com/repos/AmateurEvents/pulsar/pulls{/number}","milestones_url":"https://api.github.com/repos/AmateurEvents/pulsar/milestones{/number}","notifications_url":"https://api.github.com/repos/AmateurEvents/pulsar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AmateurEvents/pulsar/labels{/name}","releases_url":"https://api.github.com/repos/AmateurEvents/pulsar/releases{/id}","deployments_url":"https://api.github.com/repos/AmateurEvents/pulsar/deployments","created_at":"2018-10-28T01:40:02Z","updated_at":"2018-10-28T01:40:13Z","pushed_at":"2018-12-31T05:58:39Z","git_url":"git://github.com/AmateurEvents/pulsar.git","ssh_url":"git@github.com:AmateurEvents/pulsar.git","clone_url":"https://github.com/AmateurEvents/pulsar.git","svn_url":"https://github.com/AmateurEvents/pulsar","homepage":"https://pulsar.apache.org","size":67144,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"f7af5c89690f38b7a06a1632103880824e03dfd4","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":62117812,"node_id":"MDEwOlJlcG9zaXRvcnk2MjExNzgxMg==","name":"pulsar","full_name":"apache/pulsar","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apache/pulsar","description":"Apache Pulsar - distributed pub-sub messaging system","fork":false,"url":"https://api.github.com/repos/apache/pulsar","forks_url":"https://api.github.com/repos/apache/pulsar/forks","keys_url":"https://api.github.com/repos/apache/pulsar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/pulsar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/pulsar/teams","hooks_url":"https://api.github.com/repos/apache/pulsar/hooks","issue_events_url":"https://api.github.com/repos/apache/pulsar/issues/events{/number}","events_url":"https://api.github.com/repos/apache/pulsar/events","assignees_url":"https://api.github.com/repos/apache/pulsar/assignees{/user}","branches_url":"https://api.github.com/repos/apache/pulsar/branches{/branch}","tags_url":"https://api.github.com/repos/apache/pulsar/tags","blobs_url":"https://api.github.com/repos/apache/pulsar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/pulsar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/pulsar/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/pulsar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/pulsar/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/pulsar/languages","stargazers_url":"https://api.github.com/repos/apache/pulsar/stargazers","contributors_url":"https://api.github.com/repos/apache/pulsar/contributors","subscribers_url":"https://api.github.com/repos/apache/pulsar/subscribers","subscription_url":"https://api.github.com/repos/apache/pulsar/subscription","commits_url":"https://api.github.com/repos/apache/pulsar/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/pulsar/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/pulsar/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/pulsar/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/pulsar/contents/{+path}","compare_url":"https://api.github.com/repos/apache/pulsar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/pulsar/merges","archive_url":"https://api.github.com/repos/apache/pulsar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/pulsar/downloads","issues_url":"https://api.github.com/repos/apache/pulsar/issues{/number}","pulls_url":"https://api.github.com/repos/apache/pulsar/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/pulsar/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/pulsar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/pulsar/labels{/name}","releases_url":"https://api.github.com/repos/apache/pulsar/releases{/id}","deployments_url":"https://api.github.com/repos/apache/pulsar/deployments","created_at":"2016-06-28T07:00:03Z","updated_at":"2018-12-31T00:50:06Z","pushed_at":"2018-12-31T06:24:46Z","git_url":"git://github.com/apache/pulsar.git","ssh_url":"git@github.com:apache/pulsar.git","clone_url":"https://github.com/apache/pulsar.git","svn_url":"https://github.com/apache/pulsar","homepage":"https://pulsar.apache.org","size":69926,"stargazers_count":2818,"watchers_count":2818,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":590,"mirror_url":null,"archived":false,"open_issues_count":217,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":590,"open_issues":217,"watchers":2818,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/pulsar/pulls/3268"},"html":{"href":"https://github.com/apache/pulsar/pull/3268"},"issue":{"href":"https://api.github.com/repos/apache/pulsar/issues/3268"},"comments":{"href":"https://api.github.com/repos/apache/pulsar/issues/3268/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/pulsar/pulls/3268/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/pulsar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/pulsar/pulls/3268/commits"},"statuses":{"href":"https://api.github.com/repos/apache/pulsar/statuses/b08d137819ce9cda7737062b8a2096349ae7034c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sijie"}}