{"action":"created","comment":{"url":"https://api.github.com/repos/caskdata/cdap/pulls/comments/181288589","pull_request_review_id":111886367,"id":181288589,"diff_hunk":"@@ -89,13 +100,117 @@ public MetadataEntity append(String key, String value) {\n     return new MetadataEntity(existingParts);\n   }\n \n+  @Override\n+  public boolean equals(Object o) {\n+    if (this == o) {\n+      return true;\n+    }\n+    if (o == null || getClass() != o.getClass()) {\n+      return false;\n+    }\n+    MetadataEntity that = (MetadataEntity) o;\n+    return Objects.equals(details, that.details);\n+  }\n+\n+  @Override\n+  public int hashCode() {\n+    return Objects.hash(details);\n+  }\n+\n+  @Override\n+  public String toString() {\n+    return \"MetadataEntity{\" +\n+      \"details=\" + details +\n+      '}';\n+  }\n+\n   /**\n    * @return A {@link List} of {@link KeyValue} representing the metadata entity\n    */\n   public List<KeyValue> getKeyValues() {\n     return details;\n   }\n \n+  /**\n+   * @return A {@link Iterator} over the keys in this {@link MetadataEntity}\n+   */\n+  public Iterator<String> getKeys() {","path":"cdap-api/src/main/java/co/cask/cdap/api/metadata/MetadataEntity.java","position":88,"original_position":88,"commit_id":"0371dadd28504a99f7fd02d09aa3e263a0763c76","original_commit_id":"0371dadd28504a99f7fd02d09aa3e263a0763c76","user":{"login":"chtyim","id":885032,"avatar_url":"https://avatars1.githubusercontent.com/u/885032?v=4","gravatar_id":"","url":"https://api.github.com/users/chtyim","html_url":"https://github.com/chtyim","followers_url":"https://api.github.com/users/chtyim/followers","following_url":"https://api.github.com/users/chtyim/following{/other_user}","gists_url":"https://api.github.com/users/chtyim/gists{/gist_id}","starred_url":"https://api.github.com/users/chtyim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chtyim/subscriptions","organizations_url":"https://api.github.com/users/chtyim/orgs","repos_url":"https://api.github.com/users/chtyim/repos","events_url":"https://api.github.com/users/chtyim/events{/privacy}","received_events_url":"https://api.github.com/users/chtyim/received_events","type":"User","site_admin":false},"body":"Why return an `Iterator` instead of `Iterable`? You have everything in memory already, returning an `Iterable` is easier to consume.","created_at":"2018-04-13T05:29:41Z","updated_at":"2018-04-13T05:49:56Z","html_url":"https://github.com/caskdata/cdap/pull/10039#discussion_r181288589","pull_request_url":"https://api.github.com/repos/caskdata/cdap/pulls/10039","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/comments/181288589"},"html":{"href":"https://github.com/caskdata/cdap/pull/10039#discussion_r181288589"},"pull_request":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/10039"}}},"pull_request":{"url":"https://api.github.com/repos/caskdata/cdap/pulls/10039","id":181119002,"html_url":"https://github.com/caskdata/cdap/pull/10039","diff_url":"https://github.com/caskdata/cdap/pull/10039.diff","patch_url":"https://github.com/caskdata/cdap/pull/10039.patch","issue_url":"https://api.github.com/repos/caskdata/cdap/issues/10039","number":10039,"state":"open","locked":false,"title":"CDAP-13088 Metadata Custom Entity Store","user":{"login":"rohitsinha54","id":1472867,"avatar_url":"https://avatars3.githubusercontent.com/u/1472867?v=4","gravatar_id":"","url":"https://api.github.com/users/rohitsinha54","html_url":"https://github.com/rohitsinha54","followers_url":"https://api.github.com/users/rohitsinha54/followers","following_url":"https://api.github.com/users/rohitsinha54/following{/other_user}","gists_url":"https://api.github.com/users/rohitsinha54/gists{/gist_id}","starred_url":"https://api.github.com/users/rohitsinha54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rohitsinha54/subscriptions","organizations_url":"https://api.github.com/users/rohitsinha54/orgs","repos_url":"https://api.github.com/users/rohitsinha54/repos","events_url":"https://api.github.com/users/rohitsinha54/events{/privacy}","received_events_url":"https://api.github.com/users/rohitsinha54/received_events","type":"User","site_admin":false},"body":"- Add supports for storing custom (flat key-value pairs) representing either an Entity or a custom resource in CDAP.\r\n- The PR is big since the underlying storage/store level changes affects some good amount of code which needs to be updated to keep things functional. To make the changes easier to reviewer I have broken down them in multiple commits where a commit represents a particular part of change.\r\n    - CDAP-13088 New MdsKey: Introduces the new storage while keeping the backward compatibility to with old storage keys to keep search functional.\r\n    - CDAP-13088 MetadataStore and Admin Changes for new Storage: Contains all the Dataset/Store level changes\r\n    - CDAP-13088 MetadataHTTP Handler Refactoring for new Storage: Refactors and cleans up our MetadataHTTPHandler and generalizes handler for all entity types for similar action\r\n- Few points to be noted:\r\n    - This PR contains all major unit tests except unit tests with custom entities from HTTP handler layer. I have avoided to add this in this PR since it will require a cleanup of our clients and will make the PR even bigger. These changes will follow in another PR.\r\n    - More refactoring and cleanup of our existing code will follow in upcoming PRs.\r\n\r\n[Issue](https://issues.cask.co/browse/CDAP-13088)\r\n[Design](https://wiki.cask.co/display/CE/Metadata+Custom+Entities+and+Authorization#MetadataCustomEntitiesandAuthorization-MetadataStorageandIndexing)","created_at":"2018-04-12T07:58:46Z","updated_at":"2018-04-13T05:49:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa17766c2120f12239e4157ce9b623dc95cb3cb4","assignee":{"login":"anew","id":483004,"avatar_url":"https://avatars2.githubusercontent.com/u/483004?v=4","gravatar_id":"","url":"https://api.github.com/users/anew","html_url":"https://github.com/anew","followers_url":"https://api.github.com/users/anew/followers","following_url":"https://api.github.com/users/anew/following{/other_user}","gists_url":"https://api.github.com/users/anew/gists{/gist_id}","starred_url":"https://api.github.com/users/anew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anew/subscriptions","organizations_url":"https://api.github.com/users/anew/orgs","repos_url":"https://api.github.com/users/anew/repos","events_url":"https://api.github.com/users/anew/events{/privacy}","received_events_url":"https://api.github.com/users/anew/received_events","type":"User","site_admin":false},"assignees":[{"login":"anew","id":483004,"avatar_url":"https://avatars2.githubusercontent.com/u/483004?v=4","gravatar_id":"","url":"https://api.github.com/users/anew","html_url":"https://github.com/anew","followers_url":"https://api.github.com/users/anew/followers","following_url":"https://api.github.com/users/anew/following{/other_user}","gists_url":"https://api.github.com/users/anew/gists{/gist_id}","starred_url":"https://api.github.com/users/anew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anew/subscriptions","organizations_url":"https://api.github.com/users/anew/orgs","repos_url":"https://api.github.com/users/anew/repos","events_url":"https://api.github.com/users/anew/events{/privacy}","received_events_url":"https://api.github.com/users/anew/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":673594855,"url":"https://api.github.com/repos/caskdata/cdap/labels/5.0","name":"5.0","color":"ff6600","default":false}],"milestone":{"url":"https://api.github.com/repos/caskdata/cdap/milestones/34","html_url":"https://github.com/caskdata/cdap/milestone/34","labels_url":"https://api.github.com/repos/caskdata/cdap/milestones/34/labels","id":2904475,"number":34,"title":"5.0","description":null,"creator":{"login":"rohitsinha54","id":1472867,"avatar_url":"https://avatars3.githubusercontent.com/u/1472867?v=4","gravatar_id":"","url":"https://api.github.com/users/rohitsinha54","html_url":"https://github.com/rohitsinha54","followers_url":"https://api.github.com/users/rohitsinha54/followers","following_url":"https://api.github.com/users/rohitsinha54/following{/other_user}","gists_url":"https://api.github.com/users/rohitsinha54/gists{/gist_id}","starred_url":"https://api.github.com/users/rohitsinha54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rohitsinha54/subscriptions","organizations_url":"https://api.github.com/users/rohitsinha54/orgs","repos_url":"https://api.github.com/users/rohitsinha54/repos","events_url":"https://api.github.com/users/rohitsinha54/events{/privacy}","received_events_url":"https://api.github.com/users/rohitsinha54/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":8,"state":"open","created_at":"2017-11-10T20:10:34Z","updated_at":"2018-04-12T07:58:46Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/caskdata/cdap/pulls/10039/commits","review_comments_url":"https://api.github.com/repos/caskdata/cdap/pulls/10039/comments","review_comment_url":"https://api.github.com/repos/caskdata/cdap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/caskdata/cdap/issues/10039/comments","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/0371dadd28504a99f7fd02d09aa3e263a0763c76","head":{"label":"caskdata:feature/CDAP-13088-metadata-custom-entity-store","ref":"feature/CDAP-13088-metadata-custom-entity-store","sha":"0371dadd28504a99f7fd02d09aa3e263a0763c76","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars2.githubusercontent.com/u/8123023?v=4","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":22542759,"name":"cdap","full_name":"caskdata/cdap","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars2.githubusercontent.com/u/8123023?v=4","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/cdap","description":"A Unified Integration Platform - Cask Data Application Platform (CDAP)","fork":false,"url":"https://api.github.com/repos/caskdata/cdap","forks_url":"https://api.github.com/repos/caskdata/cdap/forks","keys_url":"https://api.github.com/repos/caskdata/cdap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/cdap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/cdap/teams","hooks_url":"https://api.github.com/repos/caskdata/cdap/hooks","issue_events_url":"https://api.github.com/repos/caskdata/cdap/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/cdap/events","assignees_url":"https://api.github.com/repos/caskdata/cdap/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/cdap/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/cdap/tags","blobs_url":"https://api.github.com/repos/caskdata/cdap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/cdap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/cdap/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/cdap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/cdap/languages","stargazers_url":"https://api.github.com/repos/caskdata/cdap/stargazers","contributors_url":"https://api.github.com/repos/caskdata/cdap/contributors","subscribers_url":"https://api.github.com/repos/caskdata/cdap/subscribers","subscription_url":"https://api.github.com/repos/caskdata/cdap/subscription","commits_url":"https://api.github.com/repos/caskdata/cdap/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/cdap/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/cdap/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/cdap/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskdata/cdap/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/cdap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/cdap/merges","archive_url":"https://api.github.com/repos/caskdata/cdap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/cdap/downloads","issues_url":"https://api.github.com/repos/caskdata/cdap/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/cdap/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/cdap/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/cdap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/cdap/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/cdap/releases{/id}","deployments_url":"https://api.github.com/repos/caskdata/cdap/deployments","created_at":"2014-08-02T09:00:10Z","updated_at":"2018-04-13T03:08:30Z","pushed_at":"2018-04-13T03:35:36Z","git_url":"git://github.com/caskdata/cdap.git","ssh_url":"git@github.com:caskdata/cdap.git","clone_url":"https://github.com/caskdata/cdap.git","svn_url":"https://github.com/caskdata/cdap","homepage":"http://docs.cask.co/cdap","size":531174,"stargazers_count":217,"watchers_count":217,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":115,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":115,"open_issues":11,"watchers":217,"default_branch":"develop"}},"base":{"label":"caskdata:develop","ref":"develop","sha":"a19968aa58c54c366331edac453006c7f72df63a","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars2.githubusercontent.com/u/8123023?v=4","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":22542759,"name":"cdap","full_name":"caskdata/cdap","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars2.githubusercontent.com/u/8123023?v=4","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/cdap","description":"A Unified Integration Platform - Cask Data Application Platform (CDAP)","fork":false,"url":"https://api.github.com/repos/caskdata/cdap","forks_url":"https://api.github.com/repos/caskdata/cdap/forks","keys_url":"https://api.github.com/repos/caskdata/cdap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/cdap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/cdap/teams","hooks_url":"https://api.github.com/repos/caskdata/cdap/hooks","issue_events_url":"https://api.github.com/repos/caskdata/cdap/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/cdap/events","assignees_url":"https://api.github.com/repos/caskdata/cdap/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/cdap/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/cdap/tags","blobs_url":"https://api.github.com/repos/caskdata/cdap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/cdap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/cdap/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/cdap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/cdap/languages","stargazers_url":"https://api.github.com/repos/caskdata/cdap/stargazers","contributors_url":"https://api.github.com/repos/caskdata/cdap/contributors","subscribers_url":"https://api.github.com/repos/caskdata/cdap/subscribers","subscription_url":"https://api.github.com/repos/caskdata/cdap/subscription","commits_url":"https://api.github.com/repos/caskdata/cdap/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/cdap/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/cdap/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/cdap/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskdata/cdap/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/cdap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/cdap/merges","archive_url":"https://api.github.com/repos/caskdata/cdap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/cdap/downloads","issues_url":"https://api.github.com/repos/caskdata/cdap/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/cdap/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/cdap/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/cdap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/cdap/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/cdap/releases{/id}","deployments_url":"https://api.github.com/repos/caskdata/cdap/deployments","created_at":"2014-08-02T09:00:10Z","updated_at":"2018-04-13T03:08:30Z","pushed_at":"2018-04-13T03:35:36Z","git_url":"git://github.com/caskdata/cdap.git","ssh_url":"git@github.com:caskdata/cdap.git","clone_url":"https://github.com/caskdata/cdap.git","svn_url":"https://github.com/caskdata/cdap","homepage":"http://docs.cask.co/cdap","size":531174,"stargazers_count":217,"watchers_count":217,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":115,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":115,"open_issues":11,"watchers":217,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/10039"},"html":{"href":"https://github.com/caskdata/cdap/pull/10039"},"issue":{"href":"https://api.github.com/repos/caskdata/cdap/issues/10039"},"comments":{"href":"https://api.github.com/repos/caskdata/cdap/issues/10039/comments"},"review_comments":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/10039/comments"},"review_comment":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/10039/commits"},"statuses":{"href":"https://api.github.com/repos/caskdata/cdap/statuses/0371dadd28504a99f7fd02d09aa3e263a0763c76"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"chtyim"}}