{"action":"created","comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments/38419409","id":38419409,"diff_hunk":"@@ -1233,15 +1234,41 @@ public boolean isEmpty() {\n \n     @Override\n     public void putAll(Map<? extends K, ? extends V> m) {\n-        Map<Data, Data> map = new HashMap<Data, Data>();\n+        ClientPartitionService partitionService = getContext().getPartitionService();\n+        Map<Integer, Map<Data, Data>> entryMap = new HashMap<Integer, Map<Data, Data>>(partitionService.getPartitionCount());\n+        \n         for (Entry<? extends K, ? extends V> entry : m.entrySet()) {\n+            checkNotNull(entry.getKey(), NULL_KEY_IS_NOT_ALLOWED);","path":"hazelcast-client-new/src/main/java/com/hazelcast/client/proxy/ClientMapProxy.java","position":17,"original_position":17,"commit_id":"42f816fbef755979eae839f0c1c8155749eb8cc3","original_commit_id":"42f816fbef755979eae839f0c1c8155749eb8cc3","user":{"login":"sancar","id":570462,"avatar_url":"https://avatars.githubusercontent.com/u/570462?v=3","gravatar_id":"","url":"https://api.github.com/users/sancar","html_url":"https://github.com/sancar","followers_url":"https://api.github.com/users/sancar/followers","following_url":"https://api.github.com/users/sancar/following{/other_user}","gists_url":"https://api.github.com/users/sancar/gists{/gist_id}","starred_url":"https://api.github.com/users/sancar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sancar/subscriptions","organizations_url":"https://api.github.com/users/sancar/orgs","repos_url":"https://api.github.com/users/sancar/repos","events_url":"https://api.github.com/users/sancar/events{/privacy}","received_events_url":"https://api.github.com/users/sancar/received_events","type":"User","site_admin":false},"body":"I dont think it make sense to iterate same thing twice just for that. It will slowdown the best case scenario.\r\nAnd as a defence ConcurentHashMap.putAll in java does the same. Puts some and then throw null pointer exception if came across null. ","created_at":"2015-09-01T13:44:26Z","updated_at":"2015-09-01T13:44:26Z","html_url":"https://github.com/hazelcast/hazelcast/pull/6100#discussion_r38419409","pull_request_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6100","_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments/38419409"},"html":{"href":"https://github.com/hazelcast/hazelcast/pull/6100#discussion_r38419409"},"pull_request":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6100"}}},"pull_request":{"url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6100","id":43749039,"html_url":"https://github.com/hazelcast/hazelcast/pull/6100","diff_url":"https://github.com/hazelcast/hazelcast/pull/6100.diff","patch_url":"https://github.com/hazelcast/hazelcast/pull/6100.patch","issue_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/6100","number":6100,"state":"open","locked":false,"title":"ClientMapProxy.putAll should go direct to key owners","user":{"login":"LoneRifle","id":10572368,"avatar_url":"https://avatars.githubusercontent.com/u/10572368?v=3","gravatar_id":"","url":"https://api.github.com/users/LoneRifle","html_url":"https://github.com/LoneRifle","followers_url":"https://api.github.com/users/LoneRifle/followers","following_url":"https://api.github.com/users/LoneRifle/following{/other_user}","gists_url":"https://api.github.com/users/LoneRifle/gists{/gist_id}","starred_url":"https://api.github.com/users/LoneRifle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LoneRifle/subscriptions","organizations_url":"https://api.github.com/users/LoneRifle/orgs","repos_url":"https://api.github.com/users/LoneRifle/repos","events_url":"https://api.github.com/users/LoneRifle/events{/privacy}","received_events_url":"https://api.github.com/users/LoneRifle/received_events","type":"User","site_admin":false},"body":"Port code from MapProxySupport so that MapPutAllRequests are sent directly to key owners rather than mediated by a randomly chosen member of the cluster\r\n\r\nImplements part of #6083","created_at":"2015-08-31T10:00:02Z","updated_at":"2015-09-01T13:44:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"684936b9df78ffa058893d5dc0747e67166feb7c","assignee":{"login":"sancar","id":570462,"avatar_url":"https://avatars.githubusercontent.com/u/570462?v=3","gravatar_id":"","url":"https://api.github.com/users/sancar","html_url":"https://github.com/sancar","followers_url":"https://api.github.com/users/sancar/followers","following_url":"https://api.github.com/users/sancar/following{/other_user}","gists_url":"https://api.github.com/users/sancar/gists{/gist_id}","starred_url":"https://api.github.com/users/sancar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sancar/subscriptions","organizations_url":"https://api.github.com/users/sancar/orgs","repos_url":"https://api.github.com/users/sancar/repos","events_url":"https://api.github.com/users/sancar/events{/privacy}","received_events_url":"https://api.github.com/users/sancar/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/61","html_url":"https://github.com/hazelcast/hazelcast/milestones/3.6","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/61/labels","id":982584,"number":61,"title":"3.6","description":"","creator":{"login":"enesakar","id":234086,"avatar_url":"https://avatars.githubusercontent.com/u/234086?v=3","gravatar_id":"","url":"https://api.github.com/users/enesakar","html_url":"https://github.com/enesakar","followers_url":"https://api.github.com/users/enesakar/followers","following_url":"https://api.github.com/users/enesakar/following{/other_user}","gists_url":"https://api.github.com/users/enesakar/gists{/gist_id}","starred_url":"https://api.github.com/users/enesakar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enesakar/subscriptions","organizations_url":"https://api.github.com/users/enesakar/orgs","repos_url":"https://api.github.com/users/enesakar/repos","events_url":"https://api.github.com/users/enesakar/events{/privacy}","received_events_url":"https://api.github.com/users/enesakar/received_events","type":"User","site_admin":false},"open_issues":140,"closed_issues":345,"state":"open","created_at":"2015-02-17T09:27:09Z","updated_at":"2015-09-01T12:47:46Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6100/commits","review_comments_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6100/comments","review_comment_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/6100/comments","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast/statuses/42f816fbef755979eae839f0c1c8155749eb8cc3","head":{"label":"LoneRifle:patch-clientmapproxy-putall","ref":"patch-clientmapproxy-putall","sha":"42f816fbef755979eae839f0c1c8155749eb8cc3","user":{"login":"LoneRifle","id":10572368,"avatar_url":"https://avatars.githubusercontent.com/u/10572368?v=3","gravatar_id":"","url":"https://api.github.com/users/LoneRifle","html_url":"https://github.com/LoneRifle","followers_url":"https://api.github.com/users/LoneRifle/followers","following_url":"https://api.github.com/users/LoneRifle/following{/other_user}","gists_url":"https://api.github.com/users/LoneRifle/gists{/gist_id}","starred_url":"https://api.github.com/users/LoneRifle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LoneRifle/subscriptions","organizations_url":"https://api.github.com/users/LoneRifle/orgs","repos_url":"https://api.github.com/users/LoneRifle/repos","events_url":"https://api.github.com/users/LoneRifle/events{/privacy}","received_events_url":"https://api.github.com/users/LoneRifle/received_events","type":"User","site_admin":false},"repo":{"id":40183011,"name":"hazelcast","full_name":"LoneRifle/hazelcast","owner":{"login":"LoneRifle","id":10572368,"avatar_url":"https://avatars.githubusercontent.com/u/10572368?v=3","gravatar_id":"","url":"https://api.github.com/users/LoneRifle","html_url":"https://github.com/LoneRifle","followers_url":"https://api.github.com/users/LoneRifle/followers","following_url":"https://api.github.com/users/LoneRifle/following{/other_user}","gists_url":"https://api.github.com/users/LoneRifle/gists{/gist_id}","starred_url":"https://api.github.com/users/LoneRifle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LoneRifle/subscriptions","organizations_url":"https://api.github.com/users/LoneRifle/orgs","repos_url":"https://api.github.com/users/LoneRifle/repos","events_url":"https://api.github.com/users/LoneRifle/events{/privacy}","received_events_url":"https://api.github.com/users/LoneRifle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LoneRifle/hazelcast","description":"Open Source In-Memory Data Grid","fork":true,"url":"https://api.github.com/repos/LoneRifle/hazelcast","forks_url":"https://api.github.com/repos/LoneRifle/hazelcast/forks","keys_url":"https://api.github.com/repos/LoneRifle/hazelcast/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LoneRifle/hazelcast/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LoneRifle/hazelcast/teams","hooks_url":"https://api.github.com/repos/LoneRifle/hazelcast/hooks","issue_events_url":"https://api.github.com/repos/LoneRifle/hazelcast/issues/events{/number}","events_url":"https://api.github.com/repos/LoneRifle/hazelcast/events","assignees_url":"https://api.github.com/repos/LoneRifle/hazelcast/assignees{/user}","branches_url":"https://api.github.com/repos/LoneRifle/hazelcast/branches{/branch}","tags_url":"https://api.github.com/repos/LoneRifle/hazelcast/tags","blobs_url":"https://api.github.com/repos/LoneRifle/hazelcast/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LoneRifle/hazelcast/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LoneRifle/hazelcast/git/refs{/sha}","trees_url":"https://api.github.com/repos/LoneRifle/hazelcast/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LoneRifle/hazelcast/statuses/{sha}","languages_url":"https://api.github.com/repos/LoneRifle/hazelcast/languages","stargazers_url":"https://api.github.com/repos/LoneRifle/hazelcast/stargazers","contributors_url":"https://api.github.com/repos/LoneRifle/hazelcast/contributors","subscribers_url":"https://api.github.com/repos/LoneRifle/hazelcast/subscribers","subscription_url":"https://api.github.com/repos/LoneRifle/hazelcast/subscription","commits_url":"https://api.github.com/repos/LoneRifle/hazelcast/commits{/sha}","git_commits_url":"https://api.github.com/repos/LoneRifle/hazelcast/git/commits{/sha}","comments_url":"https://api.github.com/repos/LoneRifle/hazelcast/comments{/number}","issue_comment_url":"https://api.github.com/repos/LoneRifle/hazelcast/issues/comments{/number}","contents_url":"https://api.github.com/repos/LoneRifle/hazelcast/contents/{+path}","compare_url":"https://api.github.com/repos/LoneRifle/hazelcast/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LoneRifle/hazelcast/merges","archive_url":"https://api.github.com/repos/LoneRifle/hazelcast/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LoneRifle/hazelcast/downloads","issues_url":"https://api.github.com/repos/LoneRifle/hazelcast/issues{/number}","pulls_url":"https://api.github.com/repos/LoneRifle/hazelcast/pulls{/number}","milestones_url":"https://api.github.com/repos/LoneRifle/hazelcast/milestones{/number}","notifications_url":"https://api.github.com/repos/LoneRifle/hazelcast/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LoneRifle/hazelcast/labels{/name}","releases_url":"https://api.github.com/repos/LoneRifle/hazelcast/releases{/id}","created_at":"2015-08-04T12:21:13Z","updated_at":"2015-08-04T12:21:25Z","pushed_at":"2015-09-01T12:46:32Z","git_url":"git://github.com/LoneRifle/hazelcast.git","ssh_url":"git@github.com:LoneRifle/hazelcast.git","clone_url":"https://github.com/LoneRifle/hazelcast.git","svn_url":"https://github.com/LoneRifle/hazelcast","homepage":"www.hazelcast.com","size":74666,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"3.2-fix-eacg"}},"base":{"label":"hazelcast:master","ref":"master","sha":"877c76a4025668d4b156f086c159070324b86efb","user":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars.githubusercontent.com/u/1453152?v=3","gravatar_id":"","url":"https://api.github.com/users/hazelcast","html_url":"https://github.com/hazelcast","followers_url":"https://api.github.com/users/hazelcast/followers","following_url":"https://api.github.com/users/hazelcast/following{/other_user}","gists_url":"https://api.github.com/users/hazelcast/gists{/gist_id}","starred_url":"https://api.github.com/users/hazelcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hazelcast/subscriptions","organizations_url":"https://api.github.com/users/hazelcast/orgs","repos_url":"https://api.github.com/users/hazelcast/repos","events_url":"https://api.github.com/users/hazelcast/events{/privacy}","received_events_url":"https://api.github.com/users/hazelcast/received_events","type":"Organization","site_admin":false},"repo":{"id":3786237,"name":"hazelcast","full_name":"hazelcast/hazelcast","owner":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars.githubusercontent.com/u/1453152?v=3","gravatar_id":"","url":"https://api.github.com/users/hazelcast","html_url":"https://github.com/hazelcast","followers_url":"https://api.github.com/users/hazelcast/followers","following_url":"https://api.github.com/users/hazelcast/following{/other_user}","gists_url":"https://api.github.com/users/hazelcast/gists{/gist_id}","starred_url":"https://api.github.com/users/hazelcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hazelcast/subscriptions","organizations_url":"https://api.github.com/users/hazelcast/orgs","repos_url":"https://api.github.com/users/hazelcast/repos","events_url":"https://api.github.com/users/hazelcast/events{/privacy}","received_events_url":"https://api.github.com/users/hazelcast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hazelcast/hazelcast","description":"Open Source In-Memory Data Grid","fork":false,"url":"https://api.github.com/repos/hazelcast/hazelcast","forks_url":"https://api.github.com/repos/hazelcast/hazelcast/forks","keys_url":"https://api.github.com/repos/hazelcast/hazelcast/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hazelcast/hazelcast/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hazelcast/hazelcast/teams","hooks_url":"https://api.github.com/repos/hazelcast/hazelcast/hooks","issue_events_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/events{/number}","events_url":"https://api.github.com/repos/hazelcast/hazelcast/events","assignees_url":"https://api.github.com/repos/hazelcast/hazelcast/assignees{/user}","branches_url":"https://api.github.com/repos/hazelcast/hazelcast/branches{/branch}","tags_url":"https://api.github.com/repos/hazelcast/hazelcast/tags","blobs_url":"https://api.github.com/repos/hazelcast/hazelcast/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hazelcast/hazelcast/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hazelcast/hazelcast/git/refs{/sha}","trees_url":"https://api.github.com/repos/hazelcast/hazelcast/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast/statuses/{sha}","languages_url":"https://api.github.com/repos/hazelcast/hazelcast/languages","stargazers_url":"https://api.github.com/repos/hazelcast/hazelcast/stargazers","contributors_url":"https://api.github.com/repos/hazelcast/hazelcast/contributors","subscribers_url":"https://api.github.com/repos/hazelcast/hazelcast/subscribers","subscription_url":"https://api.github.com/repos/hazelcast/hazelcast/subscription","commits_url":"https://api.github.com/repos/hazelcast/hazelcast/commits{/sha}","git_commits_url":"https://api.github.com/repos/hazelcast/hazelcast/git/commits{/sha}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/comments{/number}","issue_comment_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/comments{/number}","contents_url":"https://api.github.com/repos/hazelcast/hazelcast/contents/{+path}","compare_url":"https://api.github.com/repos/hazelcast/hazelcast/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hazelcast/hazelcast/merges","archive_url":"https://api.github.com/repos/hazelcast/hazelcast/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hazelcast/hazelcast/downloads","issues_url":"https://api.github.com/repos/hazelcast/hazelcast/issues{/number}","pulls_url":"https://api.github.com/repos/hazelcast/hazelcast/pulls{/number}","milestones_url":"https://api.github.com/repos/hazelcast/hazelcast/milestones{/number}","notifications_url":"https://api.github.com/repos/hazelcast/hazelcast/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/labels{/name}","releases_url":"https://api.github.com/repos/hazelcast/hazelcast/releases{/id}","created_at":"2012-03-21T12:25:18Z","updated_at":"2015-09-01T09:16:18Z","pushed_at":"2015-09-01T13:39:30Z","git_url":"git://github.com/hazelcast/hazelcast.git","ssh_url":"git@github.com:hazelcast/hazelcast.git","clone_url":"https://github.com/hazelcast/hazelcast.git","svn_url":"https://github.com/hazelcast/hazelcast","homepage":"www.hazelcast.com","size":152113,"stargazers_count":1221,"watchers_count":1221,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":593,"mirror_url":null,"open_issues_count":489,"forks":593,"open_issues":489,"watchers":1221,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6100"},"html":{"href":"https://github.com/hazelcast/hazelcast/pull/6100"},"issue":{"href":"https://api.github.com/repos/hazelcast/hazelcast/issues/6100"},"comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast/issues/6100/comments"},"review_comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6100/comments"},"review_comment":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hazelcast/hazelcast/pulls/6100/commits"},"statuses":{"href":"https://api.github.com/repos/hazelcast/hazelcast/statuses/42f816fbef755979eae839f0c1c8155749eb8cc3"}}}}