{"action":"created","comment":{"url":"https://api.github.com/repos/Graylog2/graylog2-server/pulls/comments/28418285","id":28418285,"diff_hunk":"@@ -519,14 +523,22 @@ private void ensureAuthentication() {\n             }\n         }\n \n+        private class RequestAndFuture {\n+            private final Request request;\n+            private final ListenableFuture<Response> listenableFuture;\n+            public RequestAndFuture(Request request, ListenableFuture<Response> listenableFuture) {\n+                this.request = request;\n+                this.listenableFuture = listenableFuture;\n+            }\n+        }\n         @Override\n-        public Map<Node, T> executeOnAll() {\n+        public Map<Node, T> executeOnAll() throws APIException {\n             HashMap<Node, T> results = Maps.newHashMap();\n             if (node == null && nodes == null) {\n                 nodes = serverNodes.all();\n             }\n \n-            final Map<Node, ListenableFuture<Response>> requests = Maps.newHashMap();\n+            final Map<Node, RequestAndFuture> requests = Maps.newHashMap();","path":"graylog2-rest-client/src/main/java/org/graylog2/restclient/lib/ApiClientImpl.java","position":168,"original_position":168,"commit_id":"6ac7f790560b43f4429aaff544d18b6a50caa9ea","original_commit_id":"6ac7f790560b43f4429aaff544d18b6a50caa9ea","user":{"login":"joschi","id":43951,"avatar_url":"https://avatars.githubusercontent.com/u/43951?v=3","gravatar_id":"","url":"https://api.github.com/users/joschi","html_url":"https://github.com/joschi","followers_url":"https://api.github.com/users/joschi/followers","following_url":"https://api.github.com/users/joschi/following{/other_user}","gists_url":"https://api.github.com/users/joschi/gists{/gist_id}","starred_url":"https://api.github.com/users/joschi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joschi/subscriptions","organizations_url":"https://api.github.com/users/joschi/orgs","repos_url":"https://api.github.com/users/joschi/repos","events_url":"https://api.github.com/users/joschi/events{/privacy}","received_events_url":"https://api.github.com/users/joschi/received_events","type":"User","site_admin":false},"body":"We know the final size of the map (`nodes.size()`) so we could initialize it with the correct size.","created_at":"2015-04-15T13:25:07Z","updated_at":"2015-04-15T13:25:07Z","html_url":"https://github.com/Graylog2/graylog2-server/pull/1115#discussion_r28418285","pull_request_url":"https://api.github.com/repos/Graylog2/graylog2-server/pulls/1115","_links":{"self":{"href":"https://api.github.com/repos/Graylog2/graylog2-server/pulls/comments/28418285"},"html":{"href":"https://github.com/Graylog2/graylog2-server/pull/1115#discussion_r28418285"},"pull_request":{"href":"https://api.github.com/repos/Graylog2/graylog2-server/pulls/1115"}}},"pull_request":{"url":"https://api.github.com/repos/Graylog2/graylog2-server/pulls/1115","id":33342241,"html_url":"https://github.com/Graylog2/graylog2-server/pull/1115","diff_url":"https://github.com/Graylog2/graylog2-server/pull/1115.diff","patch_url":"https://github.com/Graylog2/graylog2-server/pull/1115.patch","issue_url":"https://api.github.com/repos/Graylog2/graylog2-server/issues/1115","number":1115,"state":"open","locked":false,"title":"do not ignore the expected response codes in executeOnAll","user":{"login":"kroepke","id":52014,"avatar_url":"https://avatars.githubusercontent.com/u/52014?v=3","gravatar_id":"","url":"https://api.github.com/users/kroepke","html_url":"https://github.com/kroepke","followers_url":"https://api.github.com/users/kroepke/followers","following_url":"https://api.github.com/users/kroepke/following{/other_user}","gists_url":"https://api.github.com/users/kroepke/gists{/gist_id}","starred_url":"https://api.github.com/users/kroepke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kroepke/subscriptions","organizations_url":"https://api.github.com/users/kroepke/orgs","repos_url":"https://api.github.com/users/kroepke/repos","events_url":"https://api.github.com/users/kroepke/events{/privacy}","received_events_url":"https://api.github.com/users/kroepke/received_events","type":"User","site_admin":false},"body":"instead, it now throws an exception if any of the parallel requests failed due to an unexpected return code (e.g. 401) which gives the caller the opportunity to return an error code to its caller (usually the UI)\r\nextracted common code between execute() and executeOnAll() to reduce the fragility of the latter\r\ncopied missing test cases from the web interface repository\r\n\r\nfixes Graylog2/graylog2-web-interface#1205","created_at":"2015-04-15T10:40:39Z","updated_at":"2015-04-15T13:25:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af6083975929b3f9d3cae8de8302de1d353299aa","assignee":{"login":"joschi","id":43951,"avatar_url":"https://avatars.githubusercontent.com/u/43951?v=3","gravatar_id":"","url":"https://api.github.com/users/joschi","html_url":"https://github.com/joschi","followers_url":"https://api.github.com/users/joschi/followers","following_url":"https://api.github.com/users/joschi/following{/other_user}","gists_url":"https://api.github.com/users/joschi/gists{/gist_id}","starred_url":"https://api.github.com/users/joschi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joschi/subscriptions","organizations_url":"https://api.github.com/users/joschi/orgs","repos_url":"https://api.github.com/users/joschi/repos","events_url":"https://api.github.com/users/joschi/events{/privacy}","received_events_url":"https://api.github.com/users/joschi/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Graylog2/graylog2-server/milestones/33","html_url":"https://github.com/Graylog2/graylog2-server/milestones/1.1.0","labels_url":"https://api.github.com/repos/Graylog2/graylog2-server/milestones/33/labels","id":934861,"number":33,"title":"1.1.0","description":"","creator":{"login":"kroepke","id":52014,"avatar_url":"https://avatars.githubusercontent.com/u/52014?v=3","gravatar_id":"","url":"https://api.github.com/users/kroepke","html_url":"https://github.com/kroepke","followers_url":"https://api.github.com/users/kroepke/followers","following_url":"https://api.github.com/users/kroepke/following{/other_user}","gists_url":"https://api.github.com/users/kroepke/gists{/gist_id}","starred_url":"https://api.github.com/users/kroepke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kroepke/subscriptions","organizations_url":"https://api.github.com/users/kroepke/orgs","repos_url":"https://api.github.com/users/kroepke/repos","events_url":"https://api.github.com/users/kroepke/events{/privacy}","received_events_url":"https://api.github.com/users/kroepke/received_events","type":"User","site_admin":false},"open_issues":36,"closed_issues":26,"state":"open","created_at":"2015-01-14T10:41:21Z","updated_at":"2015-04-15T12:35:06Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Graylog2/graylog2-server/pulls/1115/commits","review_comments_url":"https://api.github.com/repos/Graylog2/graylog2-server/pulls/1115/comments","review_comment_url":"https://api.github.com/repos/Graylog2/graylog2-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Graylog2/graylog2-server/issues/1115/comments","statuses_url":"https://api.github.com/repos/Graylog2/graylog2-server/statuses/6ac7f790560b43f4429aaff544d18b6a50caa9ea","head":{"label":"Graylog2:issue-apiclient–web-1205","ref":"issue-apiclient–web-1205","sha":"6ac7f790560b43f4429aaff544d18b6a50caa9ea","user":{"login":"Graylog2","id":474892,"avatar_url":"https://avatars.githubusercontent.com/u/474892?v=3","gravatar_id":"","url":"https://api.github.com/users/Graylog2","html_url":"https://github.com/Graylog2","followers_url":"https://api.github.com/users/Graylog2/followers","following_url":"https://api.github.com/users/Graylog2/following{/other_user}","gists_url":"https://api.github.com/users/Graylog2/gists{/gist_id}","starred_url":"https://api.github.com/users/Graylog2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Graylog2/subscriptions","organizations_url":"https://api.github.com/users/Graylog2/orgs","repos_url":"https://api.github.com/users/Graylog2/repos","events_url":"https://api.github.com/users/Graylog2/events{/privacy}","received_events_url":"https://api.github.com/users/Graylog2/received_events","type":"Organization","site_admin":false},"repo":{"id":671825,"name":"graylog2-server","full_name":"Graylog2/graylog2-server","owner":{"login":"Graylog2","id":474892,"avatar_url":"https://avatars.githubusercontent.com/u/474892?v=3","gravatar_id":"","url":"https://api.github.com/users/Graylog2","html_url":"https://github.com/Graylog2","followers_url":"https://api.github.com/users/Graylog2/followers","following_url":"https://api.github.com/users/Graylog2/following{/other_user}","gists_url":"https://api.github.com/users/Graylog2/gists{/gist_id}","starred_url":"https://api.github.com/users/Graylog2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Graylog2/subscriptions","organizations_url":"https://api.github.com/users/Graylog2/orgs","repos_url":"https://api.github.com/users/Graylog2/repos","events_url":"https://api.github.com/users/Graylog2/events{/privacy}","received_events_url":"https://api.github.com/users/Graylog2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Graylog2/graylog2-server","description":"Free and open source log management","fork":false,"url":"https://api.github.com/repos/Graylog2/graylog2-server","forks_url":"https://api.github.com/repos/Graylog2/graylog2-server/forks","keys_url":"https://api.github.com/repos/Graylog2/graylog2-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Graylog2/graylog2-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Graylog2/graylog2-server/teams","hooks_url":"https://api.github.com/repos/Graylog2/graylog2-server/hooks","issue_events_url":"https://api.github.com/repos/Graylog2/graylog2-server/issues/events{/number}","events_url":"https://api.github.com/repos/Graylog2/graylog2-server/events","assignees_url":"https://api.github.com/repos/Graylog2/graylog2-server/assignees{/user}","branches_url":"https://api.github.com/repos/Graylog2/graylog2-server/branches{/branch}","tags_url":"https://api.github.com/repos/Graylog2/graylog2-server/tags","blobs_url":"https://api.github.com/repos/Graylog2/graylog2-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Graylog2/graylog2-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Graylog2/graylog2-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/Graylog2/graylog2-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Graylog2/graylog2-server/statuses/{sha}","languages_url":"https://api.github.com/repos/Graylog2/graylog2-server/languages","stargazers_url":"https://api.github.com/repos/Graylog2/graylog2-server/stargazers","contributors_url":"https://api.github.com/repos/Graylog2/graylog2-server/contributors","subscribers_url":"https://api.github.com/repos/Graylog2/graylog2-server/subscribers","subscription_url":"https://api.github.com/repos/Graylog2/graylog2-server/subscription","commits_url":"https://api.github.com/repos/Graylog2/graylog2-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/Graylog2/graylog2-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/Graylog2/graylog2-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/Graylog2/graylog2-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/Graylog2/graylog2-server/contents/{+path}","compare_url":"https://api.github.com/repos/Graylog2/graylog2-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Graylog2/graylog2-server/merges","archive_url":"https://api.github.com/repos/Graylog2/graylog2-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Graylog2/graylog2-server/downloads","issues_url":"https://api.github.com/repos/Graylog2/graylog2-server/issues{/number}","pulls_url":"https://api.github.com/repos/Graylog2/graylog2-server/pulls{/number}","milestones_url":"https://api.github.com/repos/Graylog2/graylog2-server/milestones{/number}","notifications_url":"https://api.github.com/repos/Graylog2/graylog2-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Graylog2/graylog2-server/labels{/name}","releases_url":"https://api.github.com/repos/Graylog2/graylog2-server/releases{/id}","created_at":"2010-05-17T21:27:02Z","updated_at":"2015-04-15T09:52:12Z","pushed_at":"2015-04-15T10:40:39Z","git_url":"git://github.com/Graylog2/graylog2-server.git","ssh_url":"git@github.com:Graylog2/graylog2-server.git","clone_url":"https://github.com/Graylog2/graylog2-server.git","svn_url":"https://github.com/Graylog2/graylog2-server","homepage":"https://www.graylog.org/","size":49248,"stargazers_count":1262,"watchers_count":1262,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":209,"mirror_url":null,"open_issues_count":202,"forks":209,"open_issues":202,"watchers":1262,"default_branch":"master"}},"base":{"label":"Graylog2:master","ref":"master","sha":"a41f4fbfcbbcf4b7e075666e2897271b7c8fa34e","user":{"login":"Graylog2","id":474892,"avatar_url":"https://avatars.githubusercontent.com/u/474892?v=3","gravatar_id":"","url":"https://api.github.com/users/Graylog2","html_url":"https://github.com/Graylog2","followers_url":"https://api.github.com/users/Graylog2/followers","following_url":"https://api.github.com/users/Graylog2/following{/other_user}","gists_url":"https://api.github.com/users/Graylog2/gists{/gist_id}","starred_url":"https://api.github.com/users/Graylog2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Graylog2/subscriptions","organizations_url":"https://api.github.com/users/Graylog2/orgs","repos_url":"https://api.github.com/users/Graylog2/repos","events_url":"https://api.github.com/users/Graylog2/events{/privacy}","received_events_url":"https://api.github.com/users/Graylog2/received_events","type":"Organization","site_admin":false},"repo":{"id":671825,"name":"graylog2-server","full_name":"Graylog2/graylog2-server","owner":{"login":"Graylog2","id":474892,"avatar_url":"https://avatars.githubusercontent.com/u/474892?v=3","gravatar_id":"","url":"https://api.github.com/users/Graylog2","html_url":"https://github.com/Graylog2","followers_url":"https://api.github.com/users/Graylog2/followers","following_url":"https://api.github.com/users/Graylog2/following{/other_user}","gists_url":"https://api.github.com/users/Graylog2/gists{/gist_id}","starred_url":"https://api.github.com/users/Graylog2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Graylog2/subscriptions","organizations_url":"https://api.github.com/users/Graylog2/orgs","repos_url":"https://api.github.com/users/Graylog2/repos","events_url":"https://api.github.com/users/Graylog2/events{/privacy}","received_events_url":"https://api.github.com/users/Graylog2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Graylog2/graylog2-server","description":"Free and open source log management","fork":false,"url":"https://api.github.com/repos/Graylog2/graylog2-server","forks_url":"https://api.github.com/repos/Graylog2/graylog2-server/forks","keys_url":"https://api.github.com/repos/Graylog2/graylog2-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Graylog2/graylog2-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Graylog2/graylog2-server/teams","hooks_url":"https://api.github.com/repos/Graylog2/graylog2-server/hooks","issue_events_url":"https://api.github.com/repos/Graylog2/graylog2-server/issues/events{/number}","events_url":"https://api.github.com/repos/Graylog2/graylog2-server/events","assignees_url":"https://api.github.com/repos/Graylog2/graylog2-server/assignees{/user}","branches_url":"https://api.github.com/repos/Graylog2/graylog2-server/branches{/branch}","tags_url":"https://api.github.com/repos/Graylog2/graylog2-server/tags","blobs_url":"https://api.github.com/repos/Graylog2/graylog2-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Graylog2/graylog2-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Graylog2/graylog2-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/Graylog2/graylog2-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Graylog2/graylog2-server/statuses/{sha}","languages_url":"https://api.github.com/repos/Graylog2/graylog2-server/languages","stargazers_url":"https://api.github.com/repos/Graylog2/graylog2-server/stargazers","contributors_url":"https://api.github.com/repos/Graylog2/graylog2-server/contributors","subscribers_url":"https://api.github.com/repos/Graylog2/graylog2-server/subscribers","subscription_url":"https://api.github.com/repos/Graylog2/graylog2-server/subscription","commits_url":"https://api.github.com/repos/Graylog2/graylog2-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/Graylog2/graylog2-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/Graylog2/graylog2-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/Graylog2/graylog2-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/Graylog2/graylog2-server/contents/{+path}","compare_url":"https://api.github.com/repos/Graylog2/graylog2-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Graylog2/graylog2-server/merges","archive_url":"https://api.github.com/repos/Graylog2/graylog2-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Graylog2/graylog2-server/downloads","issues_url":"https://api.github.com/repos/Graylog2/graylog2-server/issues{/number}","pulls_url":"https://api.github.com/repos/Graylog2/graylog2-server/pulls{/number}","milestones_url":"https://api.github.com/repos/Graylog2/graylog2-server/milestones{/number}","notifications_url":"https://api.github.com/repos/Graylog2/graylog2-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Graylog2/graylog2-server/labels{/name}","releases_url":"https://api.github.com/repos/Graylog2/graylog2-server/releases{/id}","created_at":"2010-05-17T21:27:02Z","updated_at":"2015-04-15T09:52:12Z","pushed_at":"2015-04-15T10:40:39Z","git_url":"git://github.com/Graylog2/graylog2-server.git","ssh_url":"git@github.com:Graylog2/graylog2-server.git","clone_url":"https://github.com/Graylog2/graylog2-server.git","svn_url":"https://github.com/Graylog2/graylog2-server","homepage":"https://www.graylog.org/","size":49248,"stargazers_count":1262,"watchers_count":1262,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":209,"mirror_url":null,"open_issues_count":202,"forks":209,"open_issues":202,"watchers":1262,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Graylog2/graylog2-server/pulls/1115"},"html":{"href":"https://github.com/Graylog2/graylog2-server/pull/1115"},"issue":{"href":"https://api.github.com/repos/Graylog2/graylog2-server/issues/1115"},"comments":{"href":"https://api.github.com/repos/Graylog2/graylog2-server/issues/1115/comments"},"review_comments":{"href":"https://api.github.com/repos/Graylog2/graylog2-server/pulls/1115/comments"},"review_comment":{"href":"https://api.github.com/repos/Graylog2/graylog2-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Graylog2/graylog2-server/pulls/1115/commits"},"statuses":{"href":"https://api.github.com/repos/Graylog2/graylog2-server/statuses/6ac7f790560b43f4429aaff544d18b6a50caa9ea"}}}}