{"action":"created","comment":{"url":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls/comments/38632702","id":38632702,"diff_hunk":"@@ -0,0 +1,45 @@\n+package org.infinispan.hadoop.impl;\n+\n+import org.apache.hadoop.mapreduce.RecordWriter;\n+import org.apache.hadoop.mapreduce.TaskAttemptContext;\n+import org.infinispan.client.hotrod.RemoteCache;\n+\n+import java.io.IOException;\n+import java.util.LinkedHashMap;\n+import java.util.Map;\n+\n+/**\n+ * Write output to the configured cache.\n+ *\n+ * @param <K> Key type\n+ * @param <V> Value type\n+ * @author gustavonalle\n+ * @since 0.1\n+ */\n+public class InfinispanRecordWriter<K, V> extends RecordWriter<K, V> {\n+   private final RemoteCache<K, V> remoteCache;\n+   private final int writeBatchSize;\n+   private final Map<K, V> batch;\n+\n+   public InfinispanRecordWriter(RemoteCache<K, V> remoteCache, int writeBatchSize) {\n+      this.remoteCache = remoteCache;\n+      this.writeBatchSize = writeBatchSize;\n+      this.batch = new LinkedHashMap<>(writeBatchSize);","path":"core/src/main/java/org/infinispan/hadoop/impl/InfinispanRecordWriter.java","position":27,"original_position":27,"commit_id":"ade3a402a4a90fdaa5d29b10330a5c354f82b22f","original_commit_id":"ade3a402a4a90fdaa5d29b10330a5c354f82b22f","user":{"login":"gustavonalle","id":440989,"avatar_url":"https://avatars.githubusercontent.com/u/440989?v=3","gravatar_id":"","url":"https://api.github.com/users/gustavonalle","html_url":"https://github.com/gustavonalle","followers_url":"https://api.github.com/users/gustavonalle/followers","following_url":"https://api.github.com/users/gustavonalle/following{/other_user}","gists_url":"https://api.github.com/users/gustavonalle/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavonalle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavonalle/subscriptions","organizations_url":"https://api.github.com/users/gustavonalle/orgs","repos_url":"https://api.github.com/users/gustavonalle/repos","events_url":"https://api.github.com/users/gustavonalle/events{/privacy}","received_events_url":"https://api.github.com/users/gustavonalle/received_events","type":"User","site_admin":false},"body":"not sure what I was thinking, this is not necessary","created_at":"2015-09-03T10:43:38Z","updated_at":"2015-09-03T10:43:38Z","html_url":"https://github.com/infinispan/infinispan-hadoop/pull/1#discussion_r38632702","pull_request_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls/comments/38632702"},"html":{"href":"https://github.com/infinispan/infinispan-hadoop/pull/1#discussion_r38632702"},"pull_request":{"href":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls/1","id":43405977,"html_url":"https://github.com/infinispan/infinispan-hadoop/pull/1","diff_url":"https://github.com/infinispan/infinispan-hadoop/pull/1.diff","patch_url":"https://github.com/infinispan/infinispan-hadoop/pull/1.patch","issue_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/issues/1","number":1,"state":"open","locked":false,"title":"ISPN-5191 Hadoop Integration","user":{"login":"gustavonalle","id":440989,"avatar_url":"https://avatars.githubusercontent.com/u/440989?v=3","gravatar_id":"","url":"https://api.github.com/users/gustavonalle","html_url":"https://github.com/gustavonalle","followers_url":"https://api.github.com/users/gustavonalle/followers","following_url":"https://api.github.com/users/gustavonalle/following{/other_user}","gists_url":"https://api.github.com/users/gustavonalle/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavonalle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavonalle/subscriptions","organizations_url":"https://api.github.com/users/gustavonalle/orgs","repos_url":"https://api.github.com/users/gustavonalle/repos","events_url":"https://api.github.com/users/gustavonalle/events{/privacy}","received_events_url":"https://api.github.com/users/gustavonalle/received_events","type":"User","site_admin":false},"body":"https://issues.jboss.org/browse/ISPN-5191","created_at":"2015-08-26T14:09:01Z","updated_at":"2015-09-03T10:43:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a49a14008a09d005a06da262de3e76f6b0d95a4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls/1/commits","review_comments_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls/1/comments","review_comment_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/issues/1/comments","statuses_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/statuses/ade3a402a4a90fdaa5d29b10330a5c354f82b22f","head":{"label":"gustavonalle:master","ref":"master","sha":"ade3a402a4a90fdaa5d29b10330a5c354f82b22f","user":{"login":"gustavonalle","id":440989,"avatar_url":"https://avatars.githubusercontent.com/u/440989?v=3","gravatar_id":"","url":"https://api.github.com/users/gustavonalle","html_url":"https://github.com/gustavonalle","followers_url":"https://api.github.com/users/gustavonalle/followers","following_url":"https://api.github.com/users/gustavonalle/following{/other_user}","gists_url":"https://api.github.com/users/gustavonalle/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavonalle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavonalle/subscriptions","organizations_url":"https://api.github.com/users/gustavonalle/orgs","repos_url":"https://api.github.com/users/gustavonalle/repos","events_url":"https://api.github.com/users/gustavonalle/events{/privacy}","received_events_url":"https://api.github.com/users/gustavonalle/received_events","type":"User","site_admin":false},"repo":{"id":41419217,"name":"infinispan-hadoop","full_name":"gustavonalle/infinispan-hadoop","owner":{"login":"gustavonalle","id":440989,"avatar_url":"https://avatars.githubusercontent.com/u/440989?v=3","gravatar_id":"","url":"https://api.github.com/users/gustavonalle","html_url":"https://github.com/gustavonalle","followers_url":"https://api.github.com/users/gustavonalle/followers","following_url":"https://api.github.com/users/gustavonalle/following{/other_user}","gists_url":"https://api.github.com/users/gustavonalle/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavonalle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavonalle/subscriptions","organizations_url":"https://api.github.com/users/gustavonalle/orgs","repos_url":"https://api.github.com/users/gustavonalle/repos","events_url":"https://api.github.com/users/gustavonalle/events{/privacy}","received_events_url":"https://api.github.com/users/gustavonalle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gustavonalle/infinispan-hadoop","description":"Infinispan Hadoop integration","fork":true,"url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop","forks_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/forks","keys_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/teams","hooks_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/hooks","issue_events_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/issues/events{/number}","events_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/events","assignees_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/assignees{/user}","branches_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/branches{/branch}","tags_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/tags","blobs_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/git/refs{/sha}","trees_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/statuses/{sha}","languages_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/languages","stargazers_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/stargazers","contributors_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/contributors","subscribers_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/subscribers","subscription_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/subscription","commits_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/commits{/sha}","git_commits_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/git/commits{/sha}","comments_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/comments{/number}","issue_comment_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/issues/comments{/number}","contents_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/contents/{+path}","compare_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/merges","archive_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/downloads","issues_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/issues{/number}","pulls_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/pulls{/number}","milestones_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/milestones{/number}","notifications_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/labels{/name}","releases_url":"https://api.github.com/repos/gustavonalle/infinispan-hadoop/releases{/id}","created_at":"2015-08-26T10:17:54Z","updated_at":"2015-08-26T10:19:50Z","pushed_at":"2015-09-03T10:01:29Z","git_url":"git://github.com/gustavonalle/infinispan-hadoop.git","ssh_url":"git@github.com:gustavonalle/infinispan-hadoop.git","clone_url":"https://github.com/gustavonalle/infinispan-hadoop.git","svn_url":"https://github.com/gustavonalle/infinispan-hadoop","homepage":null,"size":114,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"infinispan:master","ref":"master","sha":"8efc5489ab90278da516c7d10ce36212730b5e93","user":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"repo":{"id":41140928,"name":"infinispan-hadoop","full_name":"infinispan/infinispan-hadoop","owner":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/infinispan/infinispan-hadoop","description":"Infinispan Hadoop integration","fork":false,"url":"https://api.github.com/repos/infinispan/infinispan-hadoop","forks_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/forks","keys_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/teams","hooks_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/hooks","issue_events_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/issues/events{/number}","events_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/events","assignees_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/assignees{/user}","branches_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/branches{/branch}","tags_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/tags","blobs_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/git/refs{/sha}","trees_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/statuses/{sha}","languages_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/languages","stargazers_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/stargazers","contributors_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/contributors","subscribers_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/subscribers","subscription_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/subscription","commits_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/commits{/sha}","git_commits_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/git/commits{/sha}","comments_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/comments{/number}","issue_comment_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/issues/comments{/number}","contents_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/contents/{+path}","compare_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/merges","archive_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/downloads","issues_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/issues{/number}","pulls_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls{/number}","milestones_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/milestones{/number}","notifications_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/labels{/name}","releases_url":"https://api.github.com/repos/infinispan/infinispan-hadoop/releases{/id}","created_at":"2015-08-21T07:07:07Z","updated_at":"2015-08-21T07:07:07Z","pushed_at":"2015-09-03T10:01:29Z","git_url":"git://github.com/infinispan/infinispan-hadoop.git","ssh_url":"git@github.com:infinispan/infinispan-hadoop.git","clone_url":"https://github.com/infinispan/infinispan-hadoop.git","svn_url":"https://github.com/infinispan/infinispan-hadoop","homepage":null,"size":500,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls/1"},"html":{"href":"https://github.com/infinispan/infinispan-hadoop/pull/1"},"issue":{"href":"https://api.github.com/repos/infinispan/infinispan-hadoop/issues/1"},"comments":{"href":"https://api.github.com/repos/infinispan/infinispan-hadoop/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/infinispan/infinispan-hadoop/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/infinispan/infinispan-hadoop/statuses/ade3a402a4a90fdaa5d29b10330a5c354f82b22f"}}}}