{"action":"opened","number":11,"pull_request":{"url":"https://api.github.com/repos/sekaiamber/KSE-Sample/pulls/11","id":51483910,"html_url":"https://github.com/sekaiamber/KSE-Sample/pull/11","diff_url":"https://github.com/sekaiamber/KSE-Sample/pull/11.diff","patch_url":"https://github.com/sekaiamber/KSE-Sample/pull/11.patch","issue_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/issues/11","number":11,"state":"open","locked":false,"title":"[refactor]. change main logic.","user":{"login":"sekaiamber","id":10176695,"avatar_url":"https://avatars.githubusercontent.com/u/10176695?v=3","gravatar_id":"","url":"https://api.github.com/users/sekaiamber","html_url":"https://github.com/sekaiamber","followers_url":"https://api.github.com/users/sekaiamber/followers","following_url":"https://api.github.com/users/sekaiamber/following{/other_user}","gists_url":"https://api.github.com/users/sekaiamber/gists{/gist_id}","starred_url":"https://api.github.com/users/sekaiamber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sekaiamber/subscriptions","organizations_url":"https://api.github.com/users/sekaiamber/orgs","repos_url":"https://api.github.com/users/sekaiamber/repos","events_url":"https://api.github.com/users/sekaiamber/events{/privacy}","received_events_url":"https://api.github.com/users/sekaiamber/received_events","type":"User","site_admin":false},"body":"#6   \r\n1: 当前代码已经注意不使用引用传参的方式。  \r\n2: 并没有使用foreach，DStream中使用foreachRdd。  \r\n3: 在flatMap之后增加persist()，这样可以防止rdd重新计算lineage，并且重构前是将所有原始数据缓存在内存，而现在是将第一次筛选后的数据缓存，在除去BaseAdapter之后，可以大大减小内存使用量。  \r\n5: 当前使用的是map()->flatMap().persist()->filter().map()->countByKey()的逻辑，这一套逻辑更加科学。","created_at":"2015-11-23T02:54:31Z","updated_at":"2015-11-23T02:54:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"sekaiamber","id":10176695,"avatar_url":"https://avatars.githubusercontent.com/u/10176695?v=3","gravatar_id":"","url":"https://api.github.com/users/sekaiamber","html_url":"https://github.com/sekaiamber","followers_url":"https://api.github.com/users/sekaiamber/followers","following_url":"https://api.github.com/users/sekaiamber/following{/other_user}","gists_url":"https://api.github.com/users/sekaiamber/gists{/gist_id}","starred_url":"https://api.github.com/users/sekaiamber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sekaiamber/subscriptions","organizations_url":"https://api.github.com/users/sekaiamber/orgs","repos_url":"https://api.github.com/users/sekaiamber/repos","events_url":"https://api.github.com/users/sekaiamber/events{/privacy}","received_events_url":"https://api.github.com/users/sekaiamber/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/pulls/11/commits","review_comments_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/pulls/11/comments","review_comment_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/issues/11/comments","statuses_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/statuses/7a68c884f13de949e5d500c4e1a73eaa064506a9","head":{"label":"sekaiamber:refactor/change-main-logic","ref":"refactor/change-main-logic","sha":"7a68c884f13de949e5d500c4e1a73eaa064506a9","user":{"login":"sekaiamber","id":10176695,"avatar_url":"https://avatars.githubusercontent.com/u/10176695?v=3","gravatar_id":"","url":"https://api.github.com/users/sekaiamber","html_url":"https://github.com/sekaiamber","followers_url":"https://api.github.com/users/sekaiamber/followers","following_url":"https://api.github.com/users/sekaiamber/following{/other_user}","gists_url":"https://api.github.com/users/sekaiamber/gists{/gist_id}","starred_url":"https://api.github.com/users/sekaiamber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sekaiamber/subscriptions","organizations_url":"https://api.github.com/users/sekaiamber/orgs","repos_url":"https://api.github.com/users/sekaiamber/repos","events_url":"https://api.github.com/users/sekaiamber/events{/privacy}","received_events_url":"https://api.github.com/users/sekaiamber/received_events","type":"User","site_admin":false},"repo":{"id":42638315,"name":"KSE-Sample","full_name":"sekaiamber/KSE-Sample","owner":{"login":"sekaiamber","id":10176695,"avatar_url":"https://avatars.githubusercontent.com/u/10176695?v=3","gravatar_id":"","url":"https://api.github.com/users/sekaiamber","html_url":"https://github.com/sekaiamber","followers_url":"https://api.github.com/users/sekaiamber/followers","following_url":"https://api.github.com/users/sekaiamber/following{/other_user}","gists_url":"https://api.github.com/users/sekaiamber/gists{/gist_id}","starred_url":"https://api.github.com/users/sekaiamber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sekaiamber/subscriptions","organizations_url":"https://api.github.com/users/sekaiamber/orgs","repos_url":"https://api.github.com/users/sekaiamber/repos","events_url":"https://api.github.com/users/sekaiamber/events{/privacy}","received_events_url":"https://api.github.com/users/sekaiamber/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sekaiamber/KSE-Sample","description":"This is a sample of Kafka-Spark streaming-Elasticsearch Sample.","fork":false,"url":"https://api.github.com/repos/sekaiamber/KSE-Sample","forks_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/forks","keys_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/teams","hooks_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/hooks","issue_events_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/issues/events{/number}","events_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/events","assignees_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/assignees{/user}","branches_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/branches{/branch}","tags_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/tags","blobs_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/git/refs{/sha}","trees_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/statuses/{sha}","languages_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/languages","stargazers_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/stargazers","contributors_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/contributors","subscribers_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/subscribers","subscription_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/subscription","commits_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/commits{/sha}","git_commits_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/git/commits{/sha}","comments_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/comments{/number}","issue_comment_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/issues/comments{/number}","contents_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/contents/{+path}","compare_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/merges","archive_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/downloads","issues_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/issues{/number}","pulls_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/pulls{/number}","milestones_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/milestones{/number}","notifications_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/labels{/name}","releases_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/releases{/id}","created_at":"2015-09-17T06:11:45Z","updated_at":"2015-11-10T07:29:39Z","pushed_at":"2015-11-23T02:52:33Z","git_url":"git://github.com/sekaiamber/KSE-Sample.git","ssh_url":"git@github.com:sekaiamber/KSE-Sample.git","clone_url":"https://github.com/sekaiamber/KSE-Sample.git","svn_url":"https://github.com/sekaiamber/KSE-Sample","homepage":null,"size":23,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":3,"default_branch":"master"}},"base":{"label":"sekaiamber:develop","ref":"develop","sha":"273162deab1f2649dfe688992758be91cb50b589","user":{"login":"sekaiamber","id":10176695,"avatar_url":"https://avatars.githubusercontent.com/u/10176695?v=3","gravatar_id":"","url":"https://api.github.com/users/sekaiamber","html_url":"https://github.com/sekaiamber","followers_url":"https://api.github.com/users/sekaiamber/followers","following_url":"https://api.github.com/users/sekaiamber/following{/other_user}","gists_url":"https://api.github.com/users/sekaiamber/gists{/gist_id}","starred_url":"https://api.github.com/users/sekaiamber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sekaiamber/subscriptions","organizations_url":"https://api.github.com/users/sekaiamber/orgs","repos_url":"https://api.github.com/users/sekaiamber/repos","events_url":"https://api.github.com/users/sekaiamber/events{/privacy}","received_events_url":"https://api.github.com/users/sekaiamber/received_events","type":"User","site_admin":false},"repo":{"id":42638315,"name":"KSE-Sample","full_name":"sekaiamber/KSE-Sample","owner":{"login":"sekaiamber","id":10176695,"avatar_url":"https://avatars.githubusercontent.com/u/10176695?v=3","gravatar_id":"","url":"https://api.github.com/users/sekaiamber","html_url":"https://github.com/sekaiamber","followers_url":"https://api.github.com/users/sekaiamber/followers","following_url":"https://api.github.com/users/sekaiamber/following{/other_user}","gists_url":"https://api.github.com/users/sekaiamber/gists{/gist_id}","starred_url":"https://api.github.com/users/sekaiamber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sekaiamber/subscriptions","organizations_url":"https://api.github.com/users/sekaiamber/orgs","repos_url":"https://api.github.com/users/sekaiamber/repos","events_url":"https://api.github.com/users/sekaiamber/events{/privacy}","received_events_url":"https://api.github.com/users/sekaiamber/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sekaiamber/KSE-Sample","description":"This is a sample of Kafka-Spark streaming-Elasticsearch Sample.","fork":false,"url":"https://api.github.com/repos/sekaiamber/KSE-Sample","forks_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/forks","keys_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/teams","hooks_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/hooks","issue_events_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/issues/events{/number}","events_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/events","assignees_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/assignees{/user}","branches_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/branches{/branch}","tags_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/tags","blobs_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/git/refs{/sha}","trees_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/statuses/{sha}","languages_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/languages","stargazers_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/stargazers","contributors_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/contributors","subscribers_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/subscribers","subscription_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/subscription","commits_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/commits{/sha}","git_commits_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/git/commits{/sha}","comments_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/comments{/number}","issue_comment_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/issues/comments{/number}","contents_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/contents/{+path}","compare_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/merges","archive_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/downloads","issues_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/issues{/number}","pulls_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/pulls{/number}","milestones_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/milestones{/number}","notifications_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/labels{/name}","releases_url":"https://api.github.com/repos/sekaiamber/KSE-Sample/releases{/id}","created_at":"2015-09-17T06:11:45Z","updated_at":"2015-11-10T07:29:39Z","pushed_at":"2015-11-23T02:52:33Z","git_url":"git://github.com/sekaiamber/KSE-Sample.git","ssh_url":"git@github.com:sekaiamber/KSE-Sample.git","clone_url":"https://github.com/sekaiamber/KSE-Sample.git","svn_url":"https://github.com/sekaiamber/KSE-Sample","homepage":null,"size":23,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sekaiamber/KSE-Sample/pulls/11"},"html":{"href":"https://github.com/sekaiamber/KSE-Sample/pull/11"},"issue":{"href":"https://api.github.com/repos/sekaiamber/KSE-Sample/issues/11"},"comments":{"href":"https://api.github.com/repos/sekaiamber/KSE-Sample/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/sekaiamber/KSE-Sample/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/sekaiamber/KSE-Sample/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sekaiamber/KSE-Sample/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/sekaiamber/KSE-Sample/statuses/7a68c884f13de949e5d500c4e1a73eaa064506a9"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":178,"deletions":90,"changed_files":4}}