aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/grpc
diff options
context:
space:
mode:
authorGravatar Jakob Buchgraber <buchgr@google.com>2018-03-07 16:13:48 +0100
committerGravatar Jakob Buchgraber <buchgr@google.com>2018-03-07 16:14:54 +0100
commita4b4f8fb1c67a0d0489439a23e4b094816c2a71e (patch)
treeaa88d685a7c82666fb5713082c488b7cb55057d7 /third_party/grpc
parent6faa6c06fc5410565a9e491c5ae457075109eb40 (diff)
update grpc-java to 1.10.0
Diffstat (limited to 'third_party/grpc')
-rw-r--r--third_party/grpc/BUILD14
-rw-r--r--third_party/grpc/LICENSE230
-rw-r--r--third_party/grpc/README.bazel.md4
-rw-r--r--third_party/grpc/compiler/src/java_plugin/cpp/java_generator.cpp346
-rw-r--r--third_party/grpc/compiler/src/java_plugin/cpp/java_generator.h11
-rw-r--r--third_party/grpc/compiler/src/java_plugin/cpp/java_plugin.cpp11
-rw-r--r--third_party/grpc/grpc-auth-1.10.0.jarbin0 -> 12820 bytes
-rw-r--r--third_party/grpc/grpc-auth-1.7.0.jarbin12596 -> 0 bytes
-rw-r--r--third_party/grpc/grpc-context-1.10.0.jarbin0 -> 27353 bytes
-rw-r--r--third_party/grpc/grpc-context-1.7.0.jarbin27302 -> 0 bytes
-rw-r--r--third_party/grpc/grpc-core-1.10.0.jarbin0 -> 586038 bytes
-rw-r--r--third_party/grpc/grpc-core-1.7.0.jarbin501185 -> 0 bytes
-rw-r--r--third_party/grpc/grpc-netty-1.10.0.jarbin0 -> 192718 bytes
-rw-r--r--third_party/grpc/grpc-netty-1.7.0.jarbin179318 -> 0 bytes
-rw-r--r--third_party/grpc/grpc-protobuf-1.10.0.jarbin0 -> 6862 bytes
-rw-r--r--third_party/grpc/grpc-protobuf-1.7.0.jarbin6732 -> 0 bytes
-rw-r--r--third_party/grpc/grpc-protobuf-lite-1.10.0.jarbin0 -> 8186 bytes
-rw-r--r--third_party/grpc/grpc-protobuf-lite-1.7.0.jarbin8024 -> 0 bytes
-rw-r--r--third_party/grpc/grpc-stub-1.10.0.jarbin0 -> 38673 bytes
-rw-r--r--third_party/grpc/grpc-stub-1.7.0.jarbin37147 -> 0 bytes
20 files changed, 401 insertions, 215 deletions
diff --git a/third_party/grpc/BUILD b/third_party/grpc/BUILD
index e570046629..e1463a24f2 100644
--- a/third_party/grpc/BUILD
+++ b/third_party/grpc/BUILD
@@ -15,13 +15,13 @@ config_setting(
filegroup(
name = "bootstrap-grpc-jars",
srcs = [
- "grpc-auth-1.7.0.jar",
- "grpc-netty-1.7.0.jar",
- "grpc-protobuf-1.7.0.jar",
- "grpc-protobuf-lite-1.7.0.jar",
- "grpc-stub-1.7.0.jar",
- "grpc-core-1.7.0.jar",
- "grpc-context-1.7.0.jar",
+ "grpc-auth-1.10.0.jar",
+ "grpc-netty-1.10.0.jar",
+ "grpc-protobuf-1.10.0.jar",
+ "grpc-protobuf-lite-1.10.0.jar",
+ "grpc-stub-1.10.0.jar",
+ "grpc-core-1.10.0.jar",
+ "grpc-context-1.10.0.jar",
],
)
diff --git a/third_party/grpc/LICENSE b/third_party/grpc/LICENSE
index 2acb3d7503..d645695673 100644
--- a/third_party/grpc/LICENSE
+++ b/third_party/grpc/LICENSE
@@ -1,28 +1,202 @@
-Copyright 2014, Google Inc. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/third_party/grpc/README.bazel.md b/third_party/grpc/README.bazel.md
index afdcaf245a..1b3521fd77 100644
--- a/third_party/grpc/README.bazel.md
+++ b/third_party/grpc/README.bazel.md
@@ -11,9 +11,9 @@
# How to update the Java plugin:
-1. Checkout commit `a6cb001147b7a53c11516b5fdfec32aa21a1a9fa` from https://github.com/grpc/grpc-java
+1. Checkout tag `v1.10.0` from https://github.com/grpc/grpc-java
2. `cp -R <grpc-java git tree>/compiler/src/java_plugin third_party/grpc/compiler/src`
# How to update the Java code:
-Download the necessary jars at version `1.7.0` from maven central.
+Download the necessary jars at version `1.10.0` from maven central.
diff --git a/third_party/grpc/compiler/src/java_plugin/cpp/java_generator.cpp b/third_party/grpc/compiler/src/java_plugin/cpp/java_generator.cpp
index 75162a5123..7cb01238ac 100644
--- a/third_party/grpc/compiler/src/java_plugin/cpp/java_generator.cpp
+++ b/third_party/grpc/compiler/src/java_plugin/cpp/java_generator.cpp
@@ -74,6 +74,14 @@ static inline string MethodPropertiesFieldName(const MethodDescriptor* method) {
return "METHOD_" + ToAllUpperCase(method->name());
}
+static inline string MethodPropertiesGetterName(const MethodDescriptor* method) {
+ return MixedLower("get_" + method->name() + "_method");
+}
+
+static inline string MethodPropertiesGetterHelperName(const MethodDescriptor* method) {
+ return MixedLower("get_" + method->name() + "_method_helper");
+}
+
static inline string MethodIdFieldName(const MethodDescriptor* method) {
return "METHODID_" + ToAllUpperCase(method->name());
}
@@ -87,7 +95,7 @@ static inline string MessageFullJavaName(bool nano, const Descriptor* desc) {
// No java package specified.
return "nano." + name;
}
- for (int i = 0; i < name.size(); ++i) {
+ for (size_t i = 0; i < name.size(); ++i) {
if ((name[i] == '.') && (i < (name.size() - 1)) && isupper(name[i + 1])) {
return name.substr(0, i + 1) + "nano." + name.substr(i + 1);
}
@@ -251,7 +259,7 @@ static void GrpcWriteDocCommentBody(Printer* printer,
printer->Print(" * <pre>\n");
}
- for (int i = 0; i < lines.size(); i++) {
+ for (size_t i = 0; i < lines.size(); i++) {
// Most lines should start with a space. Watch out for lines that start
// with a /, since putting that right after the leading asterisk will
// close the comment.
@@ -313,6 +321,9 @@ static void PrintMethodFields(
(*vars)["output_type"] = MessageFullJavaName(flavor == ProtoFlavor::NANO,
method->output_type());
(*vars)["method_field_name"] = MethodPropertiesFieldName(method);
+ (*vars)["method_new_field_name"] = MethodPropertiesGetterName(method);
+ (*vars)["method_method_name"] = MethodPropertiesGetterName(method);
+ (*vars)["method_method_name_helper"] = MethodPropertiesGetterHelperName(method);
bool client_streaming = method->client_streaming();
bool server_streaming = method->server_streaming();
if (client_streaming) {
@@ -338,17 +349,41 @@ static void PrintMethodFields(
"private static final int ARG_IN_$method_field_name$ = $arg_in_id$;\n"
"private static final int ARG_OUT_$method_field_name$ = $arg_out_id$;\n"
"@$ExperimentalApi$(\"https://github.com/grpc/grpc-java/issues/1901\")\n"
+ "@$Deprecated$ // Use {@link #$method_method_name$()} instead. \n"
"public static final $MethodDescriptor$<$input_type$,\n"
- " $output_type$> $method_field_name$ =\n"
- " $MethodDescriptor$.create(\n"
- " $MethodType$.$method_type$,\n"
- " generateFullMethodName(\n"
- " \"$Package$$service_name$\", \"$method_name$\"),\n"
- " $NanoUtils$.<$input_type$>marshaller(\n"
- " new NanoFactory<$input_type$>(ARG_IN_$method_field_name$)),\n"
- " $NanoUtils$.<$output_type$>marshaller(\n"
- " new NanoFactory<$output_type$>(ARG_OUT_$method_field_name$))\n"
- " );\n");
+ " $output_type$> $method_field_name$ = $method_method_name_helper$();\n"
+ "\n"
+ "private static volatile $MethodDescriptor$<$input_type$,\n"
+ " $output_type$> $method_new_field_name$;\n"
+ "\n"
+ "@$ExperimentalApi$(\"https://github.com/grpc/grpc-java/issues/1901\")\n"
+ "public static $MethodDescriptor$<$input_type$,\n"
+ " $output_type$> $method_method_name$() {\n"
+ " return $method_method_name_helper$();\n"
+ "}\n"
+ "\n"
+ "private static $MethodDescriptor$<$input_type$,\n"
+ " $output_type$> $method_method_name_helper$() {\n"
+ " $MethodDescriptor$<$input_type$, $output_type$> $method_new_field_name$;\n"
+ " if (($method_new_field_name$ = $service_class_name$.$method_new_field_name$) == null) {\n"
+ " synchronized ($service_class_name$.class) {\n"
+ " if (($method_new_field_name$ = $service_class_name$.$method_new_field_name$) == null) {\n"
+ " $service_class_name$.$method_new_field_name$ = $method_new_field_name$ = \n"
+ " $MethodDescriptor$.<$input_type$, $output_type$>newBuilder()\n"
+ " .setType($MethodType$.$method_type$)\n"
+ " .setFullMethodName(generateFullMethodName(\n"
+ " \"$Package$$service_name$\", \"$method_name$\"))\n"
+ " .setSampledToLocalTracing(true)\n"
+ " .setRequestMarshaller($NanoUtils$.<$input_type$>marshaller(\n"
+ " new NanoFactory<$input_type$>(ARG_IN_$method_field_name$)))\n"
+ " .setResponseMarshaller($NanoUtils$.<$output_type$>marshaller(\n"
+ " new NanoFactory<$output_type$>(ARG_OUT_$method_field_name$)))\n"
+ " .build();\n"
+ " }\n"
+ " }\n"
+ " }\n"
+ " return $method_new_field_name$;\n"
+ "}\n");
} else {
if (flavor == ProtoFlavor::LITE) {
(*vars)["ProtoUtils"] = "io.grpc.protobuf.lite.ProtoLiteUtils";
@@ -358,14 +393,53 @@ static void PrintMethodFields(
p->Print(
*vars,
"@$ExperimentalApi$(\"https://github.com/grpc/grpc-java/issues/1901\")\n"
+ "@$Deprecated$ // Use {@link #$method_method_name$()} instead. \n"
"public static final $MethodDescriptor$<$input_type$,\n"
- " $output_type$> $method_field_name$ =\n"
- " $MethodDescriptor$.create(\n"
- " $MethodType$.$method_type$,\n"
- " generateFullMethodName(\n"
- " \"$Package$$service_name$\", \"$method_name$\"),\n"
- " $ProtoUtils$.marshaller($input_type$.getDefaultInstance()),\n"
- " $ProtoUtils$.marshaller($output_type$.getDefaultInstance()));\n");
+ " $output_type$> $method_field_name$ = $method_method_name_helper$();\n"
+ "\n"
+ "private static volatile $MethodDescriptor$<$input_type$,\n"
+ " $output_type$> $method_new_field_name$;\n"
+ "\n"
+ "@$ExperimentalApi$(\"https://github.com/grpc/grpc-java/issues/1901\")\n"
+ "public static $MethodDescriptor$<$input_type$,\n"
+ " $output_type$> $method_method_name$() {\n"
+ " return $method_method_name_helper$();\n"
+ "}\n"
+ "\n"
+ "private static $MethodDescriptor$<$input_type$,\n"
+ " $output_type$> $method_method_name_helper$() {\n"
+ " $MethodDescriptor$<$input_type$, $output_type$> $method_new_field_name$;\n"
+ " if (($method_new_field_name$ = $service_class_name$.$method_new_field_name$) == null) {\n"
+ " synchronized ($service_class_name$.class) {\n"
+ " if (($method_new_field_name$ = $service_class_name$.$method_new_field_name$) == null) {\n"
+ " $service_class_name$.$method_new_field_name$ = $method_new_field_name$ = \n"
+ " $MethodDescriptor$.<$input_type$, $output_type$>newBuilder()\n"
+ " .setType($MethodType$.$method_type$)\n"
+ " .setFullMethodName(generateFullMethodName(\n"
+ " \"$Package$$service_name$\", \"$method_name$\"))\n"
+ " .setSampledToLocalTracing(true)\n"
+ " .setRequestMarshaller($ProtoUtils$.marshaller(\n"
+ " $input_type$.getDefaultInstance()))\n"
+ " .setResponseMarshaller($ProtoUtils$.marshaller(\n"
+ " $output_type$.getDefaultInstance()))\n");
+
+ (*vars)["proto_method_descriptor_supplier"] = service->name() + "MethodDescriptorSupplier";
+ if (flavor == ProtoFlavor::NORMAL) {
+ p->Print(
+ *vars,
+ " .setSchemaDescriptor(new $proto_method_descriptor_supplier$(\"$method_name$\"))\n");
+ }
+
+ p->Print(
+ *vars,
+ " .build();\n");
+ p->Print(*vars,
+ " }\n"
+ " }\n"
+ " }\n"
+ " return $method_new_field_name$;\n"
+ "}\n");
+
}
}
p->Print("\n");
@@ -437,43 +511,11 @@ static void PrintBindServiceMethodBody(const ServiceDescriptor* service,
Printer* p,
bool generate_nano);
-static void PrintDeprecatedDocComment(const ServiceDescriptor* service,
- std::map<string, string>* vars,
- Printer* p) {
- p->Print(
- *vars,
- "/**\n"
- " * This will be removed in the next release.\n"
- " * If your code has been using gRPC-java v0.15.0 or higher already,\n"
- " * the following changes to your code are suggested:\n"
- " * <ul>\n"
- " * <li> replace {@code extends/implements $service_name$}"
- " with {@code extends $service_name$ImplBase} for server side;</li>\n"
- " * <li> replace {@code $service_name$} with {@code $service_name$Stub} for client side;"
- "</li>\n"
- " * <li> replace usage of {@code $service_name$} with {@code $service_name$ImplBase};"
- "</li>\n"
- " * <li> replace usage of {@code Abstract$service_name$}"
- " with {@link $service_name$ImplBase};</li>\n"
- " * <li> replace"
- " {@code serverBuilder.addService($service_class_name$.bindService(serviceImpl))}\n"
- " * with {@code serverBuilder.addService(serviceImpl)};</li>\n"
- " * <li> if you are mocking stubs using mockito, please do not mock them.\n"
- " * See the documentation on testing with gRPC-java;</li>\n"
- " * <li> replace {@code $service_name$BlockingClient}"
- " with {@link $service_name$BlockingStub};</li>\n"
- " * <li> replace {@code $service_name$FutureClient}"
- " with {@link $service_name$FutureStub}.</li>\n"
- " * </ul>\n"
- " */\n");
-}
-
// Prints a client interface or implementation class, or a server interface.
static void PrintStub(
const ServiceDescriptor* service,
std::map<string, string>* vars,
- Printer* p, StubType type, bool generate_nano,
- bool enable_deprecated) {
+ Printer* p, StubType type, bool generate_nano) {
const string service_name = service->name();
(*vars)["service_name"] = service_name;
(*vars)["abstract_name"] = service_name + "ImplBase";
@@ -522,34 +564,13 @@ static void PrintStub(
GrpcWriteServiceDocComment(p, service);
}
if (impl_base) {
- if (enable_deprecated) {
- p->Print(
- *vars,
- "public static abstract class $abstract_name$ implements $BindableService$, "
- "$service_name$ {\n");
- }
- else {
- p->Print(
- *vars,
- "public static abstract class $abstract_name$ implements $BindableService$ {\n");
- }
+ p->Print(
+ *vars,
+ "public static abstract class $abstract_name$ implements $BindableService$ {\n");
} else {
- if (enable_deprecated) {
- if (interface) {
- p->Print(
- *vars,
- "@$Deprecated$ public static interface $client_name$ {\n");
- } else {
- p->Print(
- *vars,
- "public static class $stub_name$ extends $AbstractStub$<$stub_name$>\n"
- " implements $client_name$ {\n");
- }
- } else {
- p->Print(
- *vars,
- "public static final class $stub_name$ extends $AbstractStub$<$stub_name$> {\n");
- }
+ p->Print(
+ *vars,
+ "public static final class $stub_name$ extends $AbstractStub$<$stub_name$> {\n");
}
p->Indent();
@@ -591,7 +612,7 @@ static void PrintStub(
(*vars)["output_type"] = MessageFullJavaName(generate_nano,
method->output_type());
(*vars)["lower_method_name"] = LowerMethodName(method);
- (*vars)["method_field_name"] = MethodPropertiesFieldName(method);
+ (*vars)["method_method_name_helper"] = MethodPropertiesGetterHelperName(method);
bool client_streaming = method->client_streaming();
bool server_streaming = method->server_streaming();
@@ -610,11 +631,6 @@ static void PrintStub(
// TODO(nmittler): Replace with WriteMethodDocComment once included by the protobuf distro.
if (!interface) {
GrpcWriteMethodDocComment(p, method);
- if (enable_deprecated) {
- p->Print(
- *vars,
- "@$Override$\n");
- }
}
p->Print("public ");
switch (call_type) {
@@ -676,11 +692,11 @@ static void PrintStub(
if (client_streaming) {
p->Print(
*vars,
- "return asyncUnimplementedStreamingCall($method_field_name$, responseObserver);\n");
+ "return asyncUnimplementedStreamingCall($method_method_name_helper$(), responseObserver);\n");
} else {
p->Print(
*vars,
- "asyncUnimplementedUnaryCall($method_field_name$, responseObserver);\n");
+ "asyncUnimplementedUnaryCall($method_method_name_helper$(), responseObserver);\n");
}
break;
default:
@@ -701,7 +717,7 @@ static void PrintStub(
p->Print(
*vars,
"return $calls_method$(\n"
- " getChannel(), $method_field_name$, getCallOptions(), $params$);\n");
+ " getChannel(), $method_method_name_helper$(), getCallOptions(), $params$);\n");
break;
case ASYNC_CALL:
if (server_streaming) {
@@ -725,7 +741,7 @@ static void PrintStub(
p->Print(
*vars,
"$last_line_prefix$$calls_method$(\n"
- " getChannel().newCall($method_field_name$, getCallOptions()), $params$);\n");
+ " getChannel().newCall($method_method_name_helper$(), getCallOptions()), $params$);\n");
break;
case FUTURE_CALL:
GRPC_CODEGEN_CHECK(!client_streaming && !server_streaming)
@@ -736,7 +752,7 @@ static void PrintStub(
p->Print(
*vars,
"return $calls_method$(\n"
- " getChannel().newCall($method_field_name$, getCallOptions()), request);\n");
+ " getChannel().newCall($method_method_name_helper$(), getCallOptions()), request);\n");
break;
}
}
@@ -769,8 +785,7 @@ static bool CompareMethodClientStreaming(const MethodDescriptor* method1,
static void PrintMethodHandlerClass(const ServiceDescriptor* service,
std::map<string, string>* vars,
Printer* p,
- bool generate_nano,
- bool enable_deprecated) {
+ bool generate_nano) {
// Sort method ids based on client_streaming() so switch tables are compact.
std::vector<const MethodDescriptor*> sorted_methods(service->method_count());
for (int i = 0; i < service->method_count(); ++i) {
@@ -778,7 +793,7 @@ static void PrintMethodHandlerClass(const ServiceDescriptor* service,
}
stable_sort(sorted_methods.begin(), sorted_methods.end(),
CompareMethodClientStreaming);
- for (int i = 0; i < sorted_methods.size(); i++) {
+ for (size_t i = 0; i < sorted_methods.size(); i++) {
const MethodDescriptor* method = sorted_methods[i];
(*vars)["method_id"] = to_string(i);
(*vars)["method_id_name"] = MethodIdFieldName(method);
@@ -787,11 +802,7 @@ static void PrintMethodHandlerClass(const ServiceDescriptor* service,
"private static final int $method_id_name$ = $method_id$;\n");
}
p->Print("\n");
- if (enable_deprecated) {
- (*vars)["service_name"] = service->name();
- } else {
- (*vars)["service_name"] = service->name() + "ImplBase";
- }
+ (*vars)["service_name"] = service->name() + "ImplBase";
p->Print(
*vars,
"private static final class MethodHandlers<Req, Resp> implements\n"
@@ -890,22 +901,46 @@ static void PrintGetServiceDescriptorMethod(const ServiceDescriptor* service,
if (flavor == ProtoFlavor::NORMAL) {
- (*vars)["proto_descriptor_supplier"] = service->name() + "DescriptorSupplier";
+ (*vars)["proto_base_descriptor_supplier"] = service->name() + "BaseDescriptorSupplier";
+ (*vars)["proto_file_descriptor_supplier"] = service->name() + "FileDescriptorSupplier";
+ (*vars)["proto_method_descriptor_supplier"] = service->name() + "MethodDescriptorSupplier";
(*vars)["proto_class_name"] = google::protobuf::compiler::java::ClassName(service->file());
p->Print(
*vars,
- "private static final class $proto_descriptor_supplier$ implements $ProtoFileDescriptorSupplier$ {\n");
- p->Indent();
- p->Print(*vars, "@$Override$\n");
- p->Print(
- *vars,
- "public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {\n");
- p->Indent();
- p->Print(*vars, "return $proto_class_name$.getDescriptor();\n");
- p->Outdent();
- p->Print(*vars, "}\n");
- p->Outdent();
- p->Print(*vars, "}\n\n");
+ "private static abstract class $proto_base_descriptor_supplier$\n"
+ " implements $ProtoFileDescriptorSupplier$, $ProtoServiceDescriptorSupplier$ {\n"
+ " $proto_base_descriptor_supplier$() {}\n"
+ "\n"
+ " @$Override$\n"
+ " public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {\n"
+ " return $proto_class_name$.getDescriptor();\n"
+ " }\n"
+ "\n"
+ " @$Override$\n"
+ " public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {\n"
+ " return getFileDescriptor().findServiceByName(\"$service_name$\");\n"
+ " }\n"
+ "}\n"
+ "\n"
+ "private static final class $proto_file_descriptor_supplier$\n"
+ " extends $proto_base_descriptor_supplier$ {\n"
+ " $proto_file_descriptor_supplier$() {}\n"
+ "}\n"
+ "\n"
+ "private static final class $proto_method_descriptor_supplier$\n"
+ " extends $proto_base_descriptor_supplier$\n"
+ " implements $ProtoMethodDescriptorSupplier$ {\n"
+ " private final String methodName;\n"
+ "\n"
+ " $proto_method_descriptor_supplier$(String methodName) {\n"
+ " this.methodName = methodName;\n"
+ " }\n"
+ "\n"
+ " @$Override$\n"
+ " public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {\n"
+ " return getServiceDescriptor().findMethodByName(methodName);\n"
+ " }\n"
+ "}\n\n");
}
p->Print(
@@ -937,12 +972,12 @@ static void PrintGetServiceDescriptorMethod(const ServiceDescriptor* service,
if (flavor == ProtoFlavor::NORMAL) {
p->Print(
*vars,
- "\n.setSchemaDescriptor(new $proto_descriptor_supplier$())");
+ "\n.setSchemaDescriptor(new $proto_file_descriptor_supplier$())");
}
for (int i = 0; i < service->method_count(); ++i) {
const MethodDescriptor* method = service->method(i);
- (*vars)["method_field_name"] = MethodPropertiesFieldName(method);
- p->Print(*vars, "\n.addMethod($method_field_name$)");
+ (*vars)["method_method_name_helper"] = MethodPropertiesGetterHelperName(method);
+ p->Print(*vars, "\n.addMethod($method_method_name_helper$())");
}
p->Print("\n.build();\n");
p->Outdent();
@@ -973,7 +1008,7 @@ static void PrintBindServiceMethodBody(const ServiceDescriptor* service,
for (int i = 0; i < service->method_count(); ++i) {
const MethodDescriptor* method = service->method(i);
(*vars)["lower_method_name"] = LowerMethodName(method);
- (*vars)["method_field_name"] = MethodPropertiesFieldName(method);
+ (*vars)["method_method_name_helper"] = MethodPropertiesGetterHelperName(method);
(*vars)["input_type"] = MessageFullJavaName(generate_nano,
method->input_type());
(*vars)["output_type"] = MessageFullJavaName(generate_nano,
@@ -998,7 +1033,7 @@ static void PrintBindServiceMethodBody(const ServiceDescriptor* service,
p->Indent();
p->Print(
*vars,
- "$method_field_name$,\n"
+ "$method_method_name_helper$(),\n"
"$calls_method$(\n");
p->Indent();
p->Print(
@@ -1020,14 +1055,15 @@ static void PrintService(const ServiceDescriptor* service,
std::map<string, string>* vars,
Printer* p,
ProtoFlavor flavor,
- bool enable_deprecated) {
+ bool disable_version) {
(*vars)["service_name"] = service->name();
(*vars)["file_name"] = service->file()->name();
(*vars)["service_class_name"] = ServiceClassName(service);
+ (*vars)["grpc_version"] = "";
#ifdef GRPC_VERSION
+ if (!disable_version) {
(*vars)["grpc_version"] = " (version " XSTR(GRPC_VERSION) ")";
- #else
- (*vars)["grpc_version"] = "";
+ }
#endif
// TODO(nmittler): Replace with WriteServiceDocComment once included by protobuf distro.
GrpcWriteServiceDocComment(p, service);
@@ -1076,8 +1112,8 @@ static void PrintService(const ServiceDescriptor* service,
p->Print("}\n\n");
// TODO(nmittler): Replace with WriteDocComment once included by protobuf distro.
- GrpcWriteDocComment(p, " Creates a new ListenableFuture-style stub that supports unary and "
- "streaming output calls on the service");
+ GrpcWriteDocComment(p, " Creates a new ListenableFuture-style stub that supports unary calls "
+ "on the service");
p->Print(
*vars,
"public static $service_name$FutureStub newFutureStub(\n"
@@ -1090,38 +1126,12 @@ static void PrintService(const ServiceDescriptor* service,
p->Print("}\n\n");
bool generate_nano = flavor == ProtoFlavor::NANO;
- PrintStub(service, vars, p, ABSTRACT_CLASS, generate_nano, enable_deprecated);
- PrintStub(service, vars, p, ASYNC_CLIENT_IMPL, generate_nano, enable_deprecated);
- PrintStub(service, vars, p, BLOCKING_CLIENT_IMPL, generate_nano, enable_deprecated);
- PrintStub(service, vars, p, FUTURE_CLIENT_IMPL, generate_nano, enable_deprecated);
-
- if (enable_deprecated) {
- PrintDeprecatedDocComment(service, vars, p);
- PrintStub(service, vars, p, ASYNC_INTERFACE, generate_nano, true);
- PrintDeprecatedDocComment(service, vars, p);
- PrintStub(service, vars, p, BLOCKING_CLIENT_INTERFACE, generate_nano, true);
- PrintDeprecatedDocComment(service, vars, p);
- PrintStub(service, vars, p, FUTURE_CLIENT_INTERFACE, generate_nano, true);
-
- PrintDeprecatedDocComment(service, vars, p);
- p->Print(
- *vars,
- "@$Deprecated$ public static abstract class Abstract$service_name$"
- " extends $service_name$ImplBase {}\n\n");
+ PrintStub(service, vars, p, ABSTRACT_CLASS, generate_nano);
+ PrintStub(service, vars, p, ASYNC_CLIENT_IMPL, generate_nano);
+ PrintStub(service, vars, p, BLOCKING_CLIENT_IMPL, generate_nano);
+ PrintStub(service, vars, p, FUTURE_CLIENT_IMPL, generate_nano);
- // static bindService method
- PrintDeprecatedDocComment(service, vars, p);
- p->Print(
- *vars,
- "@$Deprecated$ public static $ServerServiceDefinition$ bindService("
- "final $service_name$ serviceImpl) {\n");
- (*vars)["instance"] = "serviceImpl";
- PrintBindServiceMethodBody(service, vars, p, generate_nano);
- p->Print(
- *vars,
- "}\n\n");
- }
- PrintMethodHandlerClass(service, vars, p, generate_nano, enable_deprecated);
+ PrintMethodHandlerClass(service, vars, p, generate_nano);
PrintGetServiceDescriptorMethod(service, vars, p, flavor);
p->Outdent();
p->Print("}\n");
@@ -1130,33 +1140,33 @@ static void PrintService(const ServiceDescriptor* service,
void PrintImports(Printer* p, bool generate_nano) {
p->Print(
"import static "
- "io.grpc.stub.ClientCalls.asyncUnaryCall;\n"
+ "io.grpc.MethodDescriptor.generateFullMethodName;\n"
"import static "
- "io.grpc.stub.ClientCalls.asyncServerStreamingCall;\n"
+ "io.grpc.stub.ClientCalls.asyncBidiStreamingCall;\n"
"import static "
"io.grpc.stub.ClientCalls.asyncClientStreamingCall;\n"
"import static "
- "io.grpc.stub.ClientCalls.asyncBidiStreamingCall;\n"
+ "io.grpc.stub.ClientCalls.asyncServerStreamingCall;\n"
"import static "
- "io.grpc.stub.ClientCalls.blockingUnaryCall;\n"
+ "io.grpc.stub.ClientCalls.asyncUnaryCall;\n"
"import static "
"io.grpc.stub.ClientCalls.blockingServerStreamingCall;\n"
"import static "
+ "io.grpc.stub.ClientCalls.blockingUnaryCall;\n"
+ "import static "
"io.grpc.stub.ClientCalls.futureUnaryCall;\n"
"import static "
- "io.grpc.MethodDescriptor.generateFullMethodName;\n"
+ "io.grpc.stub.ServerCalls.asyncBidiStreamingCall;\n"
"import static "
- "io.grpc.stub.ServerCalls.asyncUnaryCall;\n"
+ "io.grpc.stub.ServerCalls.asyncClientStreamingCall;\n"
"import static "
"io.grpc.stub.ServerCalls.asyncServerStreamingCall;\n"
"import static "
- "io.grpc.stub.ServerCalls.asyncClientStreamingCall;\n"
- "import static "
- "io.grpc.stub.ServerCalls.asyncBidiStreamingCall;\n"
+ "io.grpc.stub.ServerCalls.asyncUnaryCall;\n"
"import static "
- "io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;\n"
+ "io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;\n"
"import static "
- "io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;\n\n");
+ "io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;\n\n");
if (generate_nano) {
p->Print("import java.io.IOException;\n\n");
}
@@ -1165,13 +1175,13 @@ void PrintImports(Printer* p, bool generate_nano) {
void GenerateService(const ServiceDescriptor* service,
google::protobuf::io::ZeroCopyOutputStream* out,
ProtoFlavor flavor,
- bool enable_deprecated) {
+ bool disable_version) {
// All non-generated classes must be referred by fully qualified names to
// avoid collision with generated classes.
std::map<string, string> vars;
vars["String"] = "java.lang.String";
- vars["Override"] = "java.lang.Override";
vars["Deprecated"] = "java.lang.Deprecated";
+ vars["Override"] = "java.lang.Override";
vars["Channel"] = "io.grpc.Channel";
vars["CallOptions"] = "io.grpc.CallOptions";
vars["MethodType"] = "io.grpc.MethodDescriptor.MethodType";
@@ -1184,6 +1194,10 @@ void GenerateService(const ServiceDescriptor* service,
"io.grpc.ServiceDescriptor";
vars["ProtoFileDescriptorSupplier"] =
"io.grpc.protobuf.ProtoFileDescriptorSupplier";
+ vars["ProtoServiceDescriptorSupplier"] =
+ "io.grpc.protobuf.ProtoServiceDescriptorSupplier";
+ vars["ProtoMethodDescriptorSupplier"] =
+ "io.grpc.protobuf.ProtoMethodDescriptorSupplier";
vars["AbstractStub"] = "io.grpc.stub.AbstractStub";
vars["MethodDescriptor"] = "io.grpc.MethodDescriptor";
vars["NanoUtils"] = "io.grpc.protobuf.nano.NanoUtils";
@@ -1209,7 +1223,7 @@ void GenerateService(const ServiceDescriptor* service,
if (!vars["Package"].empty()) {
vars["Package"].append(".");
}
- PrintService(service, &vars, &printer, flavor, enable_deprecated);
+ PrintService(service, &vars, &printer, flavor, disable_version);
}
string ServiceJavaPackage(const FileDescriptor* file, bool nano) {
diff --git a/third_party/grpc/compiler/src/java_plugin/cpp/java_generator.h b/third_party/grpc/compiler/src/java_plugin/cpp/java_generator.h
index 6754249ec3..ab265d06c7 100644
--- a/third_party/grpc/compiler/src/java_plugin/cpp/java_generator.h
+++ b/third_party/grpc/compiler/src/java_plugin/cpp/java_generator.h
@@ -10,15 +10,12 @@
class LogHelper {
std::ostream* os;
- bool abort;
public:
- LogHelper(std::ostream* os, bool abort) : os(os), abort(abort) {}
+ LogHelper(std::ostream* os) : os(os) {}
~LogHelper() {
*os << std::endl;
- if (abort) {
- ::abort();
- }
+ ::abort();
}
std::ostream& get_os() {
return *os;
@@ -27,7 +24,7 @@ class LogHelper {
// Abort the program after logging the mesage if the given condition is not
// true. Otherwise, do nothing.
-#define GRPC_CODEGEN_CHECK(x) !(x) && LogHelper(&std::cerr, true).get_os() \
+#define GRPC_CODEGEN_CHECK(x) !(x) && LogHelper(&std::cerr).get_os() \
<< "CHECK FAILED: " << __FILE__ << ":" \
<< __LINE__ << ": "
@@ -53,7 +50,7 @@ string ServiceClassName(const google::protobuf::ServiceDescriptor* service);
void GenerateService(const google::protobuf::ServiceDescriptor* service,
google::protobuf::io::ZeroCopyOutputStream* out,
ProtoFlavor flavor,
- bool enable_deprecated);
+ bool disable_version);
} // namespace java_grpc_generator
diff --git a/third_party/grpc/compiler/src/java_plugin/cpp/java_plugin.cpp b/third_party/grpc/compiler/src/java_plugin/cpp/java_plugin.cpp
index 72ead37841..b2cbd0bae1 100644
--- a/third_party/grpc/compiler/src/java_plugin/cpp/java_plugin.cpp
+++ b/third_party/grpc/compiler/src/java_plugin/cpp/java_plugin.cpp
@@ -37,14 +37,14 @@ class JavaGrpcGenerator : public google::protobuf::compiler::CodeGenerator {
java_grpc_generator::ProtoFlavor flavor =
java_grpc_generator::ProtoFlavor::NORMAL;
- bool enable_deprecated = false;
- for (int i = 0; i < options.size(); i++) {
+ bool disable_version = false;
+ for (size_t i = 0; i < options.size(); i++) {
if (options[i].first == "nano") {
flavor = java_grpc_generator::ProtoFlavor::NANO;
} else if (options[i].first == "lite") {
flavor = java_grpc_generator::ProtoFlavor::LITE;
- } else if (options[i].first == "enable_deprecated") {
- enable_deprecated = options[i].second == "true";
+ } else if (options[i].first == "noversion") {
+ disable_version = true;
}
}
@@ -57,7 +57,8 @@ class JavaGrpcGenerator : public google::protobuf::compiler::CodeGenerator {
+ java_grpc_generator::ServiceClassName(service) + ".java";
std::unique_ptr<google::protobuf::io::ZeroCopyOutputStream> output(
context->Open(filename));
- java_grpc_generator::GenerateService(service, output.get(), flavor, enable_deprecated);
+ java_grpc_generator::GenerateService(
+ service, output.get(), flavor, disable_version);
}
return true;
}
diff --git a/third_party/grpc/grpc-auth-1.10.0.jar b/third_party/grpc/grpc-auth-1.10.0.jar
new file mode 100644
index 0000000000..524c56368c
--- /dev/null
+++ b/third_party/grpc/grpc-auth-1.10.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-auth-1.7.0.jar b/third_party/grpc/grpc-auth-1.7.0.jar
deleted file mode 100644
index d471b05259..0000000000
--- a/third_party/grpc/grpc-auth-1.7.0.jar
+++ /dev/null
Binary files differ
diff --git a/third_party/grpc/grpc-context-1.10.0.jar b/third_party/grpc/grpc-context-1.10.0.jar
new file mode 100644
index 0000000000..f47007fb56
--- /dev/null
+++ b/third_party/grpc/grpc-context-1.10.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-context-1.7.0.jar b/third_party/grpc/grpc-context-1.7.0.jar
deleted file mode 100644
index 06858e0987..0000000000
--- a/third_party/grpc/grpc-context-1.7.0.jar
+++ /dev/null
Binary files differ
diff --git a/third_party/grpc/grpc-core-1.10.0.jar b/third_party/grpc/grpc-core-1.10.0.jar
new file mode 100644
index 0000000000..3fc873f612
--- /dev/null
+++ b/third_party/grpc/grpc-core-1.10.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-core-1.7.0.jar b/third_party/grpc/grpc-core-1.7.0.jar
deleted file mode 100644
index e6b6968c85..0000000000
--- a/third_party/grpc/grpc-core-1.7.0.jar
+++ /dev/null
Binary files differ
diff --git a/third_party/grpc/grpc-netty-1.10.0.jar b/third_party/grpc/grpc-netty-1.10.0.jar
new file mode 100644
index 0000000000..db8ded7672
--- /dev/null
+++ b/third_party/grpc/grpc-netty-1.10.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-netty-1.7.0.jar b/third_party/grpc/grpc-netty-1.7.0.jar
deleted file mode 100644
index c73f94dc8b..0000000000
--- a/third_party/grpc/grpc-netty-1.7.0.jar
+++ /dev/null
Binary files differ
diff --git a/third_party/grpc/grpc-protobuf-1.10.0.jar b/third_party/grpc/grpc-protobuf-1.10.0.jar
new file mode 100644
index 0000000000..f72c4fa7ad
--- /dev/null
+++ b/third_party/grpc/grpc-protobuf-1.10.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-protobuf-1.7.0.jar b/third_party/grpc/grpc-protobuf-1.7.0.jar
deleted file mode 100644
index 4e25a3117c..0000000000
--- a/third_party/grpc/grpc-protobuf-1.7.0.jar
+++ /dev/null
Binary files differ
diff --git a/third_party/grpc/grpc-protobuf-lite-1.10.0.jar b/third_party/grpc/grpc-protobuf-lite-1.10.0.jar
new file mode 100644
index 0000000000..2f6234c27f
--- /dev/null
+++ b/third_party/grpc/grpc-protobuf-lite-1.10.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-protobuf-lite-1.7.0.jar b/third_party/grpc/grpc-protobuf-lite-1.7.0.jar
deleted file mode 100644
index 6d7b992d9f..0000000000
--- a/third_party/grpc/grpc-protobuf-lite-1.7.0.jar
+++ /dev/null
Binary files differ
diff --git a/third_party/grpc/grpc-stub-1.10.0.jar b/third_party/grpc/grpc-stub-1.10.0.jar
new file mode 100644
index 0000000000..a56fbd2b1a
--- /dev/null
+++ b/third_party/grpc/grpc-stub-1.10.0.jar
Binary files differ
diff --git a/third_party/grpc/grpc-stub-1.7.0.jar b/third_party/grpc/grpc-stub-1.7.0.jar
deleted file mode 100644
index f247141dd8..0000000000
--- a/third_party/grpc/grpc-stub-1.7.0.jar
+++ /dev/null
Binary files differ