{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/41495163","id":41495163,"diff_hunk":"@@ -0,0 +1,336 @@\n+/*\n+ * Licensed to Elasticsearch under one or more contributor\n+ * license agreements. See the NOTICE file distributed with\n+ * this work for additional information regarding copyright\n+ * ownership. Elasticsearch licenses this file to you under\n+ * the Apache License, Version 2.0 (the \"License\"); you may\n+ * not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+package org.elasticsearch.action.support.master;\n+\n+import org.elasticsearch.Version;\n+import org.elasticsearch.action.ActionListener;\n+import org.elasticsearch.action.ActionRequestValidationException;\n+import org.elasticsearch.action.ActionResponse;\n+import org.elasticsearch.action.support.ActionFilters;\n+import org.elasticsearch.action.support.PlainActionFuture;\n+import org.elasticsearch.cluster.ClusterName;\n+import org.elasticsearch.cluster.ClusterService;\n+import org.elasticsearch.cluster.ClusterState;\n+import org.elasticsearch.cluster.block.ClusterBlock;\n+import org.elasticsearch.cluster.block.ClusterBlockException;\n+import org.elasticsearch.cluster.block.ClusterBlockLevel;\n+import org.elasticsearch.cluster.block.ClusterBlocks;\n+import org.elasticsearch.cluster.metadata.IndexMetaData;\n+import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;\n+import org.elasticsearch.cluster.metadata.MetaData;\n+import org.elasticsearch.cluster.node.DiscoveryNode;\n+import org.elasticsearch.cluster.node.DiscoveryNodes;\n+import org.elasticsearch.common.settings.Settings;\n+import org.elasticsearch.common.transport.DummyTransportAddress;\n+import org.elasticsearch.common.unit.TimeValue;\n+import org.elasticsearch.discovery.MasterNotDiscoveredException;\n+import org.elasticsearch.rest.RestStatus;\n+import org.elasticsearch.test.ESTestCase;\n+import org.elasticsearch.test.cluster.TestClusterService;\n+import org.elasticsearch.test.transport.CapturingTransport;\n+import org.elasticsearch.threadpool.ThreadPool;\n+import org.elasticsearch.transport.ConnectTransportException;\n+import org.elasticsearch.transport.TransportService;\n+import org.junit.AfterClass;\n+import org.junit.Before;\n+import org.junit.BeforeClass;\n+import org.junit.Test;\n+\n+import java.util.HashSet;\n+import java.util.Set;\n+import java.util.concurrent.ExecutionException;\n+import java.util.concurrent.TimeUnit;\n+import java.util.concurrent.atomic.AtomicBoolean;\n+\n+import static org.elasticsearch.action.support.master.TransportMasterNodeActionTests.LocalNodeMasterOptions.LOCAL_NODE_IS_MASTER;\n+import static org.elasticsearch.action.support.master.TransportMasterNodeActionTests.LocalNodeMasterOptions.LOCAL_NODE_IS_NOT_MASTER;\n+import static org.elasticsearch.action.support.master.TransportMasterNodeActionTests.MasterOptions.MASTER_DOES_NOT_EXIST;\n+import static org.elasticsearch.action.support.master.TransportMasterNodeActionTests.MasterOptions.MASTER_EXISTS;\n+import static org.elasticsearch.cluster.metadata.IndexMetaData.*;\n+import static org.hamcrest.Matchers.equalTo;\n+import static org.hamcrest.Matchers.instanceOf;\n+\n+public class TransportMasterNodeActionTests extends ESTestCase {\n+    private static ThreadPool threadPool;\n+\n+    private TestClusterService clusterService;\n+    private TransportService transportService;\n+    private CapturingTransport transport;\n+    private DiscoveryNode localNode;\n+    private DiscoveryNode remoteNode;\n+\n+    @BeforeClass\n+    public static void beforeClass() {\n+        threadPool = new ThreadPool(\"TransportMasterNodeActionTests\");\n+    }\n+\n+    @Override\n+    @Before\n+    public void setUp() throws Exception {\n+        super.setUp();\n+        transport = new CapturingTransport();\n+        clusterService = new TestClusterService(threadPool);\n+        transportService = new TransportService(transport, threadPool);\n+        transportService.start();\n+        localNode = new DiscoveryNode(\"local_node\", DummyTransportAddress.INSTANCE, Version.CURRENT);\n+        remoteNode = new DiscoveryNode(\"remote_node\", DummyTransportAddress.INSTANCE, Version.CURRENT);\n+    }\n+\n+    @AfterClass\n+    public static void afterClass() {\n+        ThreadPool.terminate(threadPool, 30, TimeUnit.SECONDS);\n+        threadPool = null;\n+    }\n+\n+    <T> void assertListenerThrows(String msg, PlainActionFuture<T> listener, Class<?> klass) throws InterruptedException {\n+        try {\n+            listener.get();\n+            fail(msg);\n+        } catch (ExecutionException ex) {\n+            assertThat(ex.getCause(), instanceOf(klass));\n+        }\n+    }\n+\n+    public static class Request extends MasterNodeRequest<Request> {\n+        @Override\n+        public ActionRequestValidationException validate() {\n+            return null;\n+        }\n+    }\n+\n+    class Response extends ActionResponse {}\n+\n+    class Action extends TransportMasterNodeAction<Request, Response> {\n+        Action(Settings settings, String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool) {\n+            super(settings, actionName, transportService, clusterService, threadPool,\n+                    new ActionFilters(new HashSet<>()), new IndexNameExpressionResolver(Settings.EMPTY), Request::new);\n+        }\n+\n+        @Override\n+        protected String executor() {\n+            // very lightweight operation in memory, no need to fork to a thread\n+            return ThreadPool.Names.SAME;\n+        }\n+\n+        @Override\n+        protected Response newResponse() {\n+            return new Response();\n+        }\n+\n+        @Override\n+        protected void masterOperation(Request request, ClusterState state, ActionListener<Response> listener) throws Exception {\n+            listener.onResponse(new Response()); // default implementation, overridden in specific tests\n+        }\n+\n+        @Override\n+        protected ClusterBlockException checkBlock(Request request, ClusterState state) {\n+            return null; // default implementation, overridden in specific tests\n+        }\n+    }\n+\n+    public enum MasterOptions {\n+        MASTER_EXISTS,\n+        MASTER_DOES_NOT_EXIST,\n+    }\n+\n+    public enum LocalNodeMasterOptions {\n+        LOCAL_NODE_IS_MASTER,\n+        LOCAL_NODE_IS_NOT_MASTER,\n+    }\n+\n+    private ClusterState mockedClusterState(MasterOptions existsMaster, LocalNodeMasterOptions localNodeIsMaster) {\n+        DiscoveryNodes.Builder discoBuilder = DiscoveryNodes.builder();\n+        discoBuilder.put(localNode);\n+        discoBuilder.put(remoteNode);\n+\n+        discoBuilder.localNodeId(localNode.id());\n+\n+        if (existsMaster == MASTER_EXISTS) {\n+            discoBuilder.masterNodeId((localNodeIsMaster == LOCAL_NODE_IS_MASTER ? localNode : remoteNode).id());\n+        }\n+\n+        IndexMetaData indexMetaData = IndexMetaData.builder(\"test-idx\").settings(Settings.builder()\n+                .put(SETTING_VERSION_CREATED, Version.CURRENT)\n+                .put(SETTING_NUMBER_OF_SHARDS, 1).put(SETTING_NUMBER_OF_REPLICAS, 1)\n+                .put(SETTING_CREATION_DATE, System.currentTimeMillis())).build();\n+        ClusterState.Builder state = ClusterState.builder(new ClusterName(\"test\"));\n+        state.nodes(discoBuilder);\n+        state.metaData(MetaData.builder().put(indexMetaData, false).generateClusterUuidIfNeeded());\n+        return state.build();\n+    }\n+\n+    @Test\n+    public void testLocalOperationWithoutBlocks() throws ExecutionException, InterruptedException {\n+        final boolean masterOperationFailure = randomBoolean();\n+\n+        Request request = new Request();\n+        PlainActionFuture<Response> listener = new PlainActionFuture<>();\n+\n+        final Throwable exception = new Throwable();\n+        final Response response = new Response();\n+\n+        clusterService.setState(mockedClusterState(MASTER_EXISTS, LOCAL_NODE_IS_MASTER));\n+\n+        new Action(Settings.EMPTY, \"testAction\", transportService, clusterService, threadPool) {\n+            @Override\n+            protected void masterOperation(Request request, ClusterState state, ActionListener<Response> listener) throws Exception {\n+                if (masterOperationFailure) {\n+                    listener.onFailure(exception);\n+                } else {\n+                    listener.onResponse(response);\n+                }\n+            }\n+        }.execute(request, listener);\n+\n+        if (masterOperationFailure) {\n+            try {\n+                listener.get();\n+                fail(\"Expected block but returned proper result\");\n+            } catch (ExecutionException ex) {\n+                assertThat(ex.getCause(), equalTo(exception));\n+            }\n+        } else {\n+            assertThat(listener.get(), equalTo(response));\n+        }\n+    }\n+\n+    @Test\n+    public void testLocalOperationWithBlocks() throws ExecutionException, InterruptedException {\n+        final boolean retryableBlock = randomBoolean();\n+        final boolean unblockBeforeTimeout = randomBoolean();\n+\n+        Request request = new Request().masterNodeTimeout(TimeValue.timeValueSeconds(unblockBeforeTimeout ? 60 : 1));","path":"core/src/test/java/org/elasticsearch/action/support/master/TransportMasterNodeActionTests.java","position":218,"original_position":218,"commit_id":"7e7f77666f06b5120047f104819a48f09c88bce8","original_commit_id":"7e7f77666f06b5120047f104819a48f09c88bce8","user":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"body":"agree","created_at":"2015-10-08T09:50:24Z","updated_at":"2015-10-08T09:50:24Z","html_url":"https://github.com/elastic/elasticsearch/pull/13998#discussion_r41495163","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/13998","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/41495163"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/13998#discussion_r41495163"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/13998"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/13998","id":47050016,"html_url":"https://github.com/elastic/elasticsearch/pull/13998","diff_url":"https://github.com/elastic/elasticsearch/pull/13998.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/13998.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13998","number":13998,"state":"open","locked":false,"title":"Tests for TransportMasterNodeAction","user":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"body":"So far, no unit tests existed for this class.","created_at":"2015-10-07T16:28:00Z","updated_at":"2015-10-08T09:50:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db34efd18499c92cea0d19e0efdfe656f3a29cb6","assignee":{"login":"brwe","id":4320215,"avatar_url":"https://avatars.githubusercontent.com/u/4320215?v=3","gravatar_id":"","url":"https://api.github.com/users/brwe","html_url":"https://github.com/brwe","followers_url":"https://api.github.com/users/brwe/followers","following_url":"https://api.github.com/users/brwe/following{/other_user}","gists_url":"https://api.github.com/users/brwe/gists{/gist_id}","starred_url":"https://api.github.com/users/brwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brwe/subscriptions","organizations_url":"https://api.github.com/users/brwe/orgs","repos_url":"https://api.github.com/users/brwe/repos","events_url":"https://api.github.com/users/brwe/events{/privacy}","received_events_url":"https://api.github.com/users/brwe/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/13998/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/13998/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13998/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/7e7f77666f06b5120047f104819a48f09c88bce8","head":{"label":"ywelsch:tests/transportmasternodeaction","ref":"tests/transportmasternodeaction","sha":"7e7f77666f06b5120047f104819a48f09c88bce8","user":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"repo":{"id":43299643,"name":"elasticsearch","full_name":"ywelsch/elasticsearch","owner":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ywelsch/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/ywelsch/elasticsearch","forks_url":"https://api.github.com/repos/ywelsch/elasticsearch/forks","keys_url":"https://api.github.com/repos/ywelsch/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ywelsch/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ywelsch/elasticsearch/teams","hooks_url":"https://api.github.com/repos/ywelsch/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/ywelsch/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/ywelsch/elasticsearch/events","assignees_url":"https://api.github.com/repos/ywelsch/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/ywelsch/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/ywelsch/elasticsearch/tags","blobs_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ywelsch/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/ywelsch/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/ywelsch/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/ywelsch/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/ywelsch/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/ywelsch/elasticsearch/subscription","commits_url":"https://api.github.com/repos/ywelsch/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/ywelsch/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/ywelsch/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/ywelsch/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/ywelsch/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ywelsch/elasticsearch/merges","archive_url":"https://api.github.com/repos/ywelsch/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ywelsch/elasticsearch/downloads","issues_url":"https://api.github.com/repos/ywelsch/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/ywelsch/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/ywelsch/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/ywelsch/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ywelsch/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/ywelsch/elasticsearch/releases{/id}","created_at":"2015-09-28T12:30:36Z","updated_at":"2015-09-28T12:31:12Z","pushed_at":"2015-10-07T15:51:29Z","git_url":"git://github.com/ywelsch/elasticsearch.git","ssh_url":"git@github.com:ywelsch/elasticsearch.git","clone_url":"https://github.com/ywelsch/elasticsearch.git","svn_url":"https://github.com/ywelsch/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":164135,"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":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"072f6ae138cff390a8f28a8024bf3a00fca73904","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","created_at":"2010-02-08T13:20:56Z","updated_at":"2015-10-08T09:17:04Z","pushed_at":"2015-10-08T09:49:36Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":447348,"stargazers_count":12991,"watchers_count":12991,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4239,"mirror_url":null,"open_issues_count":1270,"forks":4239,"open_issues":1270,"watchers":12991,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/13998"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/13998"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/13998"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/13998/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/13998/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/13998/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/7e7f77666f06b5120047f104819a48f09c88bce8"}}}}