{"action":"created","comment":{"url":"https://api.github.com/repos/grpc/grpc-java/pulls/comments/46890313","id":46890313,"diff_hunk":"@@ -0,0 +1,323 @@\n+/*\n+ * Copyright 2015, Google Inc. All rights reserved.\n+ *\n+ * Redistribution and use in source and binary forms, with or without\n+ * modification, are permitted provided that the following conditions are\n+ * met:\n+ *\n+ *    * Redistributions of source code must retain the above copyright\n+ * notice, this list of conditions and the following disclaimer.\n+ *    * Redistributions in binary form must reproduce the above\n+ * copyright notice, this list of conditions and the following disclaimer\n+ * in the documentation and/or other materials provided with the\n+ * distribution.\n+ *\n+ *    * Neither the name of Google Inc. nor the names of its\n+ * contributors may be used to endorse or promote products derived from\n+ * this software without specific prior written permission.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+package io.grpc.grpclb;\n+\n+import com.google.common.annotations.VisibleForTesting;\n+import com.google.common.base.Preconditions;\n+import com.google.common.base.Supplier;\n+import com.google.common.util.concurrent.FutureCallback;\n+import com.google.common.util.concurrent.Futures;\n+import com.google.common.util.concurrent.ListenableFuture;\n+\n+import io.grpc.Attributes;\n+import io.grpc.Channel;\n+import io.grpc.EquivalentAddressGroup;\n+import io.grpc.LoadBalancer;\n+import io.grpc.RequestKey;\n+import io.grpc.ResolvedServerInfo;\n+import io.grpc.Status;\n+import io.grpc.StatusException;\n+import io.grpc.TransportManager;\n+import io.grpc.internal.BlankFutureProvider;\n+import io.grpc.internal.BlankFutureProvider.FulfillmentBatch;\n+import io.grpc.internal.ClientTransport;\n+import io.grpc.internal.GrpcUtil;\n+import io.grpc.internal.SharedResourceHolder;\n+import io.grpc.internal.SingleTransportChannel;\n+import io.grpc.stub.StreamObserver;\n+\n+import java.net.InetSocketAddress;\n+import java.net.SocketAddress;\n+import java.util.ArrayList;\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.concurrent.ExecutorService;\n+import java.util.concurrent.ScheduledExecutorService;\n+import java.util.logging.Logger;\n+\n+import javax.annotation.Nullable;\n+import javax.annotation.concurrent.GuardedBy;\n+\n+/**\n+ * A {@link LoadBalancer} that uses the GRPCLB protocol.\n+ */\n+class GrpclbLoadBalancer extends LoadBalancer {\n+  private static final Logger logger = Logger.getLogger(GrpclbLoadBalancer.class.getName());\n+\n+  private final Object lock = new Object();\n+  private final String serviceName;\n+  private final TransportManager tm;\n+\n+  // General states\n+  @GuardedBy(\"lock\")\n+  private final BlankFutureProvider<ClientTransport> pendingPicks =\n+      new BlankFutureProvider<ClientTransport>();\n+  @GuardedBy(\"lock\")\n+  private Throwable lastError;\n+\n+  @GuardedBy(\"lock\")\n+  private boolean closed;\n+\n+  // Load-balancer service states\n+  @GuardedBy(\"lock\")\n+  private EquivalentAddressGroup lbAddresses;\n+  @GuardedBy(\"lock\")\n+  private ClientTransport lbTransport;\n+  @GuardedBy(\"lock\")\n+  private StreamObserver<LoadBalanceResponse> lbResponseObserver;\n+  @GuardedBy(\"lock\")\n+  private StreamObserver<LoadBalanceRequest> lbRequestWriter;\n+\n+  // Server list states\n+  @GuardedBy(\"lock\")\n+  private HashMap<SocketAddress, ResolvedServerInfo> servers;\n+  @GuardedBy(\"lock\")\n+  @VisibleForTesting\n+  private RoundRobinServerList roundRobinServerList;\n+\n+  private ExecutorService executor;\n+  private ScheduledExecutorService deadlineCancellationExecutor;\n+\n+  GrpclbLoadBalancer(String serviceName, TransportManager tm) {\n+    this.serviceName = serviceName;\n+    this.tm = tm;\n+    executor = SharedResourceHolder.get(GrpcUtil.SHARED_CHANNEL_EXECUTOR);\n+    deadlineCancellationExecutor = SharedResourceHolder.get(GrpcUtil.TIMER_SERVICE);\n+  }\n+\n+  @VisibleForTesting\n+  StreamObserver<LoadBalanceResponse> getLbResponseObserver() {\n+    synchronized (lock) {\n+      return lbResponseObserver;\n+    }\n+  }\n+\n+  @VisibleForTesting\n+  RoundRobinServerList getRoundRobinServerList() {\n+    synchronized (lock) {\n+      return roundRobinServerList;\n+    }\n+  }\n+\n+  @Override\n+  public ListenableFuture<ClientTransport> pickTransport(@Nullable RequestKey requestKey) {\n+    RoundRobinServerList serverListCopy;\n+    synchronized (lock) {\n+      Preconditions.checkState(!closed, \"already closed\");\n+      if (roundRobinServerList == null) {\n+        if (lastError == null) {\n+          return pendingPicks.newBlankFuture();\n+        } else {\n+          return Futures.immediateFailedFuture(lastError);\n+        }\n+      }\n+      serverListCopy = roundRobinServerList;\n+    }\n+    return serverListCopy.getTransportForNextServer();\n+  }\n+\n+  @Override\n+  public void handleResolvedAddresses(\n+      List<ResolvedServerInfo> updatedServers, Attributes config) {\n+    synchronized (lock) {\n+      ArrayList<SocketAddress> addrs = new ArrayList<SocketAddress>(updatedServers.size());\n+      for (ResolvedServerInfo serverInfo : updatedServers) {\n+        addrs.add(serverInfo.getAddress());\n+      }\n+      EquivalentAddressGroup newLbAddresses = new EquivalentAddressGroup(addrs);\n+      if (!newLbAddresses.equals(lbAddresses)) {\n+        lbAddresses = newLbAddresses;\n+        connectToLb();\n+      }\n+    }\n+  }\n+\n+  @GuardedBy(\"lock\")\n+  private void connectToLb() {\n+    if (closed) {\n+      return;\n+    }\n+    lbResponseObserver = null;\n+    // TODO(zhangkun83): should use a separate authority for LB servers\n+    Preconditions.checkNotNull(lbAddresses, \"lbAddresses\");\n+    ListenableFuture<ClientTransport> transportFuture = tm.getTransport(lbAddresses);\n+    Futures.addCallback(\n+        Preconditions.checkNotNull(transportFuture),\n+        new FutureCallback<ClientTransport>() {\n+          @Override public void onSuccess(ClientTransport transport) {\n+            synchronized (lock) {\n+              if (closed) {\n+                return;\n+              }\n+              lbTransport = transport;\n+              startNegotiation();\n+            }\n+          }\n+\n+          @Override public void onFailure(Throwable t) {\n+            handleError(Status.fromThrowable(t).augmentDescription(\n+                \"Failed to connect to LB server\"));\n+          }\n+        },\n+        executor);\n+  }\n+\n+  @GuardedBy(\"lock\")\n+  private void startNegotiation() {\n+    Preconditions.checkState(lbTransport != null, \"currentLbTransport must be available\");\n+    logger.info(\"Starting LB negotiation\");\n+    LoadBalanceRequest initRequest = LoadBalanceRequest.newBuilder()\n+        .setInitialRequest(InitialLoadBalanceRequest.newBuilder()\n+            .setName(serviceName).build())\n+        .build();\n+    lbResponseObserver = new LbResponseObserver();\n+    sendLbRequest(lbTransport, initRequest);\n+  }\n+\n+  @VisibleForTesting  // to be mocked in tests\n+  @GuardedBy(\"lock\")\n+  void sendLbRequest(ClientTransport transport, LoadBalanceRequest request) {\n+    Channel channel = new SingleTransportChannel(transport, executor,\n+        deadlineCancellationExecutor, serviceName);\n+    LoadBalancerGrpc.LoadBalancerStub stub = LoadBalancerGrpc.newStub(channel);\n+    lbRequestWriter = stub.balanceLoad(lbResponseObserver);\n+    lbRequestWriter.onNext(request);\n+  }\n+\n+  @Override\n+  public void handleNameResolutionError(Status error) {\n+    handleError(error.augmentDescription(\"Name resolution failed\"));\n+  }\n+\n+  @Override\n+  public void shutdown() {\n+    synchronized (lock) {\n+      if (closed) {\n+        return;\n+      }\n+      closed = true;\n+      if (lbRequestWriter != null) {\n+        lbRequestWriter.onCompleted();\n+      }\n+      executor = SharedResourceHolder.release(GrpcUtil.SHARED_CHANNEL_EXECUTOR, executor);\n+      deadlineCancellationExecutor = SharedResourceHolder.release(\n+          GrpcUtil.TIMER_SERVICE, deadlineCancellationExecutor);\n+    }\n+  }\n+\n+  @Override\n+  public void transportShutdown(\n+      EquivalentAddressGroup addressGroup, ClientTransport transport, Status status) {\n+    handleError(status.augmentDescription(\"Transport to LB server closed\"));\n+    synchronized (lock) {\n+      if (transport == lbTransport) {\n+        connectToLb();\n+      }\n+    }\n+  }\n+\n+  private void handleError(Status error) {\n+    FulfillmentBatch<ClientTransport> pendingPicksFulfillmentBatch;\n+    StatusException statusException = error.asException();\n+    synchronized (lock) {\n+      lastError = statusException;\n+      pendingPicksFulfillmentBatch = pendingPicks.createFulfillmentBatch();\n+    }\n+    pendingPicksFulfillmentBatch.fail(statusException);\n+  }\n+\n+  private class LbResponseObserver implements StreamObserver<LoadBalanceResponse> {\n+    @Override public void onNext(LoadBalanceResponse response) {\n+      logger.info(\"Got a LB response: \" + response);\n+      FulfillmentBatch<ClientTransport> pendingPicksFulfillmentBatch;\n+      final RoundRobinServerList newRoundRobinServerList;\n+      HashMap<SocketAddress, ResolvedServerInfo> newServerMap =\n+          new HashMap<SocketAddress, ResolvedServerInfo>();\n+      synchronized (lock) {\n+        InitialLoadBalanceResponse initialResponse = response.getInitialResponse();\n+        // TODO(zhangkun83): make use of initialResponse\n+        RoundRobinServerList.Builder listBuilder = new RoundRobinServerList.Builder(tm);\n+        ServerList serverList = response.getServerList();\n+        // TODO(zhangkun83): honor expiration_interval\n+        for (Server server : serverList.getServersList()) {\n+          if (server.getDropRequest()) {\n+            listBuilder.add(null);\n+          } else {\n+            InetSocketAddress address = new InetSocketAddress(\n+                server.getIpAddress(), server.getPort());\n+            listBuilder.add(address);\n+            // TODO(zhangkun83): fill the LB token to the attributes, and insert it to the\n+            // application RPCs.\n+            if (!newServerMap.containsKey(address)) {\n+              newServerMap.put(address, new ResolvedServerInfo(address, Attributes.EMPTY));\n+            }\n+          }\n+        }\n+        newRoundRobinServerList = listBuilder.build();\n+        if (newRoundRobinServerList.size() == 0) {\n+          return;\n+        }\n+        roundRobinServerList = newRoundRobinServerList;\n+        servers = newServerMap;\n+        pendingPicksFulfillmentBatch = pendingPicks.createFulfillmentBatch();\n+      }\n+      tm.updateRetainedTransports(newServerMap.keySet());\n+      pendingPicksFulfillmentBatch.link(\n+          new Supplier<ListenableFuture<ClientTransport>>() {\n+            @Override\n+            public ListenableFuture<ClientTransport> get() {\n+              return newRoundRobinServerList.getTransportForNextServer();\n+            }\n+          });\n+    }\n+\n+    @Override public void onError(Throwable error) {\n+      onStreamClosed(Status.fromThrowable(error)\n+          .augmentDescription(\"Stream to GRPCLB LoadBalancer had an error\"));\n+    }\n+\n+    @Override public void onCompleted() {\n+      onStreamClosed(Status.UNAVAILABLE.augmentDescription(\n+          \"Stream to GRPCLB LoadBalancer was closed\"));\n+    }\n+\n+    private void onStreamClosed(Status status) {\n+      handleError(status);\n+      synchronized (this) {","path":"grpclb/src/main/java/io/grpc/grpclb/GrpclbLoadBalancer.java","position":315,"original_position":315,"commit_id":"c430f375cd1780fc27f4c73c24c5509350a19621","original_commit_id":"32d3ab2f5b5b26dfdf4772d6390e0605f0a2f53c","user":{"login":"zhangkun83","id":9053690,"avatar_url":"https://avatars.githubusercontent.com/u/9053690?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangkun83","html_url":"https://github.com/zhangkun83","followers_url":"https://api.github.com/users/zhangkun83/followers","following_url":"https://api.github.com/users/zhangkun83/following{/other_user}","gists_url":"https://api.github.com/users/zhangkun83/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangkun83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangkun83/subscriptions","organizations_url":"https://api.github.com/users/zhangkun83/orgs","repos_url":"https://api.github.com/users/zhangkun83/repos","events_url":"https://api.github.com/users/zhangkun83/events{/privacy}","received_events_url":"https://api.github.com/users/zhangkun83/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2015-12-07T22:46:59Z","updated_at":"2015-12-07T22:46:59Z","html_url":"https://github.com/grpc/grpc-java/pull/1259#discussion_r46890313","pull_request_url":"https://api.github.com/repos/grpc/grpc-java/pulls/1259","_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc-java/pulls/comments/46890313"},"html":{"href":"https://github.com/grpc/grpc-java/pull/1259#discussion_r46890313"},"pull_request":{"href":"https://api.github.com/repos/grpc/grpc-java/pulls/1259"}}},"pull_request":{"url":"https://api.github.com/repos/grpc/grpc-java/pulls/1259","id":52732947,"html_url":"https://github.com/grpc/grpc-java/pull/1259","diff_url":"https://github.com/grpc/grpc-java/pull/1259.diff","patch_url":"https://github.com/grpc/grpc-java/pull/1259.patch","issue_url":"https://api.github.com/repos/grpc/grpc-java/issues/1259","number":1259,"state":"open","locked":false,"title":"The GRPCLB LoadBalancer","user":{"login":"zhangkun83","id":9053690,"avatar_url":"https://avatars.githubusercontent.com/u/9053690?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangkun83","html_url":"https://github.com/zhangkun83","followers_url":"https://api.github.com/users/zhangkun83/followers","following_url":"https://api.github.com/users/zhangkun83/following{/other_user}","gists_url":"https://api.github.com/users/zhangkun83/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangkun83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangkun83/subscriptions","organizations_url":"https://api.github.com/users/zhangkun83/orgs","repos_url":"https://api.github.com/users/zhangkun83/repos","events_url":"https://api.github.com/users/zhangkun83/events{/privacy}","received_events_url":"https://api.github.com/users/zhangkun83/received_events","type":"User","site_admin":false},"body":"This LoadBalancer does round-robin on a address list received from a separate \"load-balancer service\", via the protocol defined in `load_balancer.proto`. Everything is put under a subproject `grpc-grpclb`, because it has dependency to protobuf.\r\n\r\n","created_at":"2015-12-04T23:01:14Z","updated_at":"2015-12-07T22:46:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"625e0b24453c0ef6e32ccc22131cc6bb9193c540","assignee":{"login":"ejona86","id":2811396,"avatar_url":"https://avatars.githubusercontent.com/u/2811396?v=3","gravatar_id":"","url":"https://api.github.com/users/ejona86","html_url":"https://github.com/ejona86","followers_url":"https://api.github.com/users/ejona86/followers","following_url":"https://api.github.com/users/ejona86/following{/other_user}","gists_url":"https://api.github.com/users/ejona86/gists{/gist_id}","starred_url":"https://api.github.com/users/ejona86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejona86/subscriptions","organizations_url":"https://api.github.com/users/ejona86/orgs","repos_url":"https://api.github.com/users/ejona86/repos","events_url":"https://api.github.com/users/ejona86/events{/privacy}","received_events_url":"https://api.github.com/users/ejona86/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/grpc/grpc-java/pulls/1259/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc-java/pulls/1259/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc-java/issues/1259/comments","statuses_url":"https://api.github.com/repos/grpc/grpc-java/statuses/c430f375cd1780fc27f4c73c24c5509350a19621","head":{"label":"zhangkun83:grpclb","ref":"grpclb","sha":"c430f375cd1780fc27f4c73c24c5509350a19621","user":{"login":"zhangkun83","id":9053690,"avatar_url":"https://avatars.githubusercontent.com/u/9053690?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangkun83","html_url":"https://github.com/zhangkun83","followers_url":"https://api.github.com/users/zhangkun83/followers","following_url":"https://api.github.com/users/zhangkun83/following{/other_user}","gists_url":"https://api.github.com/users/zhangkun83/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangkun83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangkun83/subscriptions","organizations_url":"https://api.github.com/users/zhangkun83/orgs","repos_url":"https://api.github.com/users/zhangkun83/repos","events_url":"https://api.github.com/users/zhangkun83/events{/privacy}","received_events_url":"https://api.github.com/users/zhangkun83/received_events","type":"User","site_admin":false},"repo":{"id":31399597,"name":"grpc-java","full_name":"zhangkun83/grpc-java","owner":{"login":"zhangkun83","id":9053690,"avatar_url":"https://avatars.githubusercontent.com/u/9053690?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangkun83","html_url":"https://github.com/zhangkun83","followers_url":"https://api.github.com/users/zhangkun83/followers","following_url":"https://api.github.com/users/zhangkun83/following{/other_user}","gists_url":"https://api.github.com/users/zhangkun83/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangkun83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangkun83/subscriptions","organizations_url":"https://api.github.com/users/zhangkun83/orgs","repos_url":"https://api.github.com/users/zhangkun83/repos","events_url":"https://api.github.com/users/zhangkun83/events{/privacy}","received_events_url":"https://api.github.com/users/zhangkun83/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zhangkun83/grpc-java","description":"The Java gRPC implementation. HTTP/2 based RPC","fork":true,"url":"https://api.github.com/repos/zhangkun83/grpc-java","forks_url":"https://api.github.com/repos/zhangkun83/grpc-java/forks","keys_url":"https://api.github.com/repos/zhangkun83/grpc-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhangkun83/grpc-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhangkun83/grpc-java/teams","hooks_url":"https://api.github.com/repos/zhangkun83/grpc-java/hooks","issue_events_url":"https://api.github.com/repos/zhangkun83/grpc-java/issues/events{/number}","events_url":"https://api.github.com/repos/zhangkun83/grpc-java/events","assignees_url":"https://api.github.com/repos/zhangkun83/grpc-java/assignees{/user}","branches_url":"https://api.github.com/repos/zhangkun83/grpc-java/branches{/branch}","tags_url":"https://api.github.com/repos/zhangkun83/grpc-java/tags","blobs_url":"https://api.github.com/repos/zhangkun83/grpc-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhangkun83/grpc-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhangkun83/grpc-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhangkun83/grpc-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhangkun83/grpc-java/statuses/{sha}","languages_url":"https://api.github.com/repos/zhangkun83/grpc-java/languages","stargazers_url":"https://api.github.com/repos/zhangkun83/grpc-java/stargazers","contributors_url":"https://api.github.com/repos/zhangkun83/grpc-java/contributors","subscribers_url":"https://api.github.com/repos/zhangkun83/grpc-java/subscribers","subscription_url":"https://api.github.com/repos/zhangkun83/grpc-java/subscription","commits_url":"https://api.github.com/repos/zhangkun83/grpc-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhangkun83/grpc-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhangkun83/grpc-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhangkun83/grpc-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhangkun83/grpc-java/contents/{+path}","compare_url":"https://api.github.com/repos/zhangkun83/grpc-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhangkun83/grpc-java/merges","archive_url":"https://api.github.com/repos/zhangkun83/grpc-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhangkun83/grpc-java/downloads","issues_url":"https://api.github.com/repos/zhangkun83/grpc-java/issues{/number}","pulls_url":"https://api.github.com/repos/zhangkun83/grpc-java/pulls{/number}","milestones_url":"https://api.github.com/repos/zhangkun83/grpc-java/milestones{/number}","notifications_url":"https://api.github.com/repos/zhangkun83/grpc-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhangkun83/grpc-java/labels{/name}","releases_url":"https://api.github.com/repos/zhangkun83/grpc-java/releases{/id}","created_at":"2015-02-27T02:25:11Z","updated_at":"2015-05-07T23:26:36Z","pushed_at":"2015-12-07T22:00:14Z","git_url":"git://github.com/zhangkun83/grpc-java.git","ssh_url":"git@github.com:zhangkun83/grpc-java.git","clone_url":"https://github.com/zhangkun83/grpc-java.git","svn_url":"https://github.com/zhangkun83/grpc-java","homepage":"","size":4667,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"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":"grpc:master","ref":"master","sha":"f83a6b8761baa55e0613b260d27effc783ceff0b","user":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"repo":{"id":27729926,"name":"grpc-java","full_name":"grpc/grpc-java","owner":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grpc/grpc-java","description":"The Java gRPC implementation. HTTP/2 based RPC","fork":false,"url":"https://api.github.com/repos/grpc/grpc-java","forks_url":"https://api.github.com/repos/grpc/grpc-java/forks","keys_url":"https://api.github.com/repos/grpc/grpc-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc/grpc-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc/grpc-java/teams","hooks_url":"https://api.github.com/repos/grpc/grpc-java/hooks","issue_events_url":"https://api.github.com/repos/grpc/grpc-java/issues/events{/number}","events_url":"https://api.github.com/repos/grpc/grpc-java/events","assignees_url":"https://api.github.com/repos/grpc/grpc-java/assignees{/user}","branches_url":"https://api.github.com/repos/grpc/grpc-java/branches{/branch}","tags_url":"https://api.github.com/repos/grpc/grpc-java/tags","blobs_url":"https://api.github.com/repos/grpc/grpc-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc/grpc-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc/grpc-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc/grpc-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc/grpc-java/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc/grpc-java/languages","stargazers_url":"https://api.github.com/repos/grpc/grpc-java/stargazers","contributors_url":"https://api.github.com/repos/grpc/grpc-java/contributors","subscribers_url":"https://api.github.com/repos/grpc/grpc-java/subscribers","subscription_url":"https://api.github.com/repos/grpc/grpc-java/subscription","commits_url":"https://api.github.com/repos/grpc/grpc-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc/grpc-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc/grpc-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc/grpc-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc/grpc-java/contents/{+path}","compare_url":"https://api.github.com/repos/grpc/grpc-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc/grpc-java/merges","archive_url":"https://api.github.com/repos/grpc/grpc-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc/grpc-java/downloads","issues_url":"https://api.github.com/repos/grpc/grpc-java/issues{/number}","pulls_url":"https://api.github.com/repos/grpc/grpc-java/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc/grpc-java/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc/grpc-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc/grpc-java/labels{/name}","releases_url":"https://api.github.com/repos/grpc/grpc-java/releases{/id}","created_at":"2014-12-08T19:00:00Z","updated_at":"2015-12-04T18:19:39Z","pushed_at":"2015-12-07T22:43:16Z","git_url":"git://github.com/grpc/grpc-java.git","ssh_url":"git@github.com:grpc/grpc-java.git","clone_url":"https://github.com/grpc/grpc-java.git","svn_url":"https://github.com/grpc/grpc-java","homepage":"","size":19255,"stargazers_count":1004,"watchers_count":1004,"language":"Java","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":257,"mirror_url":null,"open_issues_count":110,"forks":257,"open_issues":110,"watchers":1004,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc-java/pulls/1259"},"html":{"href":"https://github.com/grpc/grpc-java/pull/1259"},"issue":{"href":"https://api.github.com/repos/grpc/grpc-java/issues/1259"},"comments":{"href":"https://api.github.com/repos/grpc/grpc-java/issues/1259/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc-java/pulls/1259/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc-java/pulls/1259/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc-java/statuses/c430f375cd1780fc27f4c73c24c5509350a19621"}}}}