mirror of https://github.com/grpc/grpc-java.git
Compare commits
9 Commits
Author | SHA1 | Date |
---|---|---|
|
dfff9a9475 | |
|
df1bb36ea4 | |
|
1abdaf36e8 | |
|
529d0ab330 | |
|
f06abeb6fd | |
|
77005107aa | |
|
c639b8161b | |
|
560608100f | |
|
2531563a3e |
36
README.md
36
README.md
|
@ -44,8 +44,8 @@ For a guided tour, take a look at the [quick start
|
|||
guide](https://grpc.io/docs/languages/java/quickstart) or the more explanatory [gRPC
|
||||
basics](https://grpc.io/docs/languages/java/basics).
|
||||
|
||||
The [examples](https://github.com/grpc/grpc-java/tree/v1.60.0/examples) and the
|
||||
[Android example](https://github.com/grpc/grpc-java/tree/v1.60.0/examples/android)
|
||||
The [examples](https://github.com/grpc/grpc-java/tree/v1.61.1/examples) and the
|
||||
[Android example](https://github.com/grpc/grpc-java/tree/v1.61.1/examples/android)
|
||||
are standalone projects that showcase the usage of gRPC.
|
||||
|
||||
Download
|
||||
|
@ -56,18 +56,18 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
|
|||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-netty-shaded</artifactId>
|
||||
<version>1.60.0</version>
|
||||
<version>1.61.1</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-protobuf</artifactId>
|
||||
<version>1.60.0</version>
|
||||
<version>1.61.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-stub</artifactId>
|
||||
<version>1.60.0</version>
|
||||
<version>1.61.1</version>
|
||||
</dependency>
|
||||
<dependency> <!-- necessary for Java 9+ -->
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
|
@ -79,18 +79,18 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
|
|||
|
||||
Or for Gradle with non-Android, add to your dependencies:
|
||||
```gradle
|
||||
runtimeOnly 'io.grpc:grpc-netty-shaded:1.60.0'
|
||||
implementation 'io.grpc:grpc-protobuf:1.60.0'
|
||||
implementation 'io.grpc:grpc-stub:1.60.0'
|
||||
runtimeOnly 'io.grpc:grpc-netty-shaded:1.61.1'
|
||||
implementation 'io.grpc:grpc-protobuf:1.61.1'
|
||||
implementation 'io.grpc:grpc-stub:1.61.1'
|
||||
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
|
||||
```
|
||||
|
||||
For Android client, use `grpc-okhttp` instead of `grpc-netty-shaded` and
|
||||
`grpc-protobuf-lite` instead of `grpc-protobuf`:
|
||||
```gradle
|
||||
implementation 'io.grpc:grpc-okhttp:1.60.0'
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.60.0'
|
||||
implementation 'io.grpc:grpc-stub:1.60.0'
|
||||
implementation 'io.grpc:grpc-okhttp:1.61.1'
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.61.1'
|
||||
implementation 'io.grpc:grpc-stub:1.61.1'
|
||||
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
|
||||
```
|
||||
|
||||
|
@ -99,7 +99,7 @@ For [Bazel](https://bazel.build), you can either
|
|||
(with the GAVs from above), or use `@io_grpc_grpc_java//api` et al (see below).
|
||||
|
||||
[the JARs]:
|
||||
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.60.0
|
||||
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.61.1
|
||||
|
||||
Development snapshots are available in [Sonatypes's snapshot
|
||||
repository](https://oss.sonatype.org/content/repositories/snapshots/).
|
||||
|
@ -129,9 +129,9 @@ For protobuf-based codegen integrated with the Maven build system, you can use
|
|||
<artifactId>protobuf-maven-plugin</artifactId>
|
||||
<version>0.6.1</version>
|
||||
<configuration>
|
||||
<protocArtifact>com.google.protobuf:protoc:3.24.0:exe:${os.detected.classifier}</protocArtifact>
|
||||
<protocArtifact>com.google.protobuf:protoc:3.25.1:exe:${os.detected.classifier}</protocArtifact>
|
||||
<pluginId>grpc-java</pluginId>
|
||||
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.60.0:exe:${os.detected.classifier}</pluginArtifact>
|
||||
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.61.1:exe:${os.detected.classifier}</pluginArtifact>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
@ -157,11 +157,11 @@ plugins {
|
|||
|
||||
protobuf {
|
||||
protoc {
|
||||
artifact = "com.google.protobuf:protoc:3.24.0"
|
||||
artifact = "com.google.protobuf:protoc:3.25.1"
|
||||
}
|
||||
plugins {
|
||||
grpc {
|
||||
artifact = 'io.grpc:protoc-gen-grpc-java:1.60.0'
|
||||
artifact = 'io.grpc:protoc-gen-grpc-java:1.61.1'
|
||||
}
|
||||
}
|
||||
generateProtoTasks {
|
||||
|
@ -190,11 +190,11 @@ plugins {
|
|||
|
||||
protobuf {
|
||||
protoc {
|
||||
artifact = "com.google.protobuf:protoc:3.24.0"
|
||||
artifact = "com.google.protobuf:protoc:3.25.1"
|
||||
}
|
||||
plugins {
|
||||
grpc {
|
||||
artifact = 'io.grpc:protoc-gen-grpc-java:1.60.0'
|
||||
artifact = 'io.grpc:protoc-gen-grpc-java:1.61.1'
|
||||
}
|
||||
}
|
||||
generateProtoTasks {
|
||||
|
|
|
@ -21,7 +21,7 @@ subprojects {
|
|||
apply plugin: "net.ltgt.errorprone"
|
||||
|
||||
group = "io.grpc"
|
||||
version = "1.61.0-SNAPSHOT" // CURRENT_GRPC_VERSION
|
||||
version = "1.61.1" // CURRENT_GRPC_VERSION
|
||||
|
||||
repositories {
|
||||
maven { // The google mirror is less flaky than mavenCentral()
|
||||
|
|
|
@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
|
|||
* </pre>
|
||||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler (version 1.61.0-SNAPSHOT)",
|
||||
value = "by gRPC proto compiler (version 1.61.1)",
|
||||
comments = "Source: grpc/testing/compiler/test.proto")
|
||||
@io.grpc.stub.annotations.GrpcGenerated
|
||||
@java.lang.Deprecated
|
||||
|
|
|
@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
|
|||
* </pre>
|
||||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler (version 1.61.0-SNAPSHOT)",
|
||||
value = "by gRPC proto compiler (version 1.61.1)",
|
||||
comments = "Source: grpc/testing/compiler/test.proto")
|
||||
@io.grpc.stub.annotations.GrpcGenerated
|
||||
public final class TestServiceGrpc {
|
||||
|
|
|
@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
|
|||
* </pre>
|
||||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler (version 1.61.0-SNAPSHOT)",
|
||||
value = "by gRPC proto compiler (version 1.61.1)",
|
||||
comments = "Source: grpc/testing/compiler/test.proto")
|
||||
@io.grpc.stub.annotations.GrpcGenerated
|
||||
@java.lang.Deprecated
|
||||
|
|
|
@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
|
|||
* </pre>
|
||||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler (version 1.61.0-SNAPSHOT)",
|
||||
value = "by gRPC proto compiler (version 1.61.1)",
|
||||
comments = "Source: grpc/testing/compiler/test.proto")
|
||||
@io.grpc.stub.annotations.GrpcGenerated
|
||||
public final class TestServiceGrpc {
|
||||
|
|
|
@ -220,7 +220,7 @@ public final class GrpcUtil {
|
|||
|
||||
public static final Splitter ACCEPT_ENCODING_SPLITTER = Splitter.on(',').trimResults();
|
||||
|
||||
public static final String IMPLEMENTATION_VERSION = "1.61.0-SNAPSHOT"; // CURRENT_GRPC_VERSION
|
||||
public static final String IMPLEMENTATION_VERSION = "1.61.1"; // CURRENT_GRPC_VERSION
|
||||
|
||||
/**
|
||||
* The default timeout in nanos for a keepalive ping request.
|
||||
|
|
|
@ -34,7 +34,7 @@ android {
|
|||
protobuf {
|
||||
protoc { artifact = 'com.google.protobuf:protoc:3.25.1' }
|
||||
plugins {
|
||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.1' // CURRENT_GRPC_VERSION
|
||||
}
|
||||
}
|
||||
generateProtoTasks {
|
||||
|
@ -54,12 +54,12 @@ dependencies {
|
|||
implementation 'androidx.appcompat:appcompat:1.0.0'
|
||||
|
||||
// You need to build grpc-java to obtain these libraries below.
|
||||
implementation 'io.grpc:grpc-okhttp:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-stub:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-okhttp:1.61.1' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.61.1' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-stub:1.61.1' // CURRENT_GRPC_VERSION
|
||||
implementation 'org.apache.tomcat:annotations-api:6.0.53'
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
testImplementation 'com.google.truth:truth:1.1.5'
|
||||
testImplementation 'io.grpc:grpc-testing:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
testImplementation 'io.grpc:grpc-testing:1.61.1' // CURRENT_GRPC_VERSION
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ android {
|
|||
protobuf {
|
||||
protoc { artifact = 'com.google.protobuf:protoc:3.25.1' }
|
||||
plugins {
|
||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.1' // CURRENT_GRPC_VERSION
|
||||
}
|
||||
}
|
||||
generateProtoTasks {
|
||||
|
@ -52,8 +52,8 @@ dependencies {
|
|||
implementation 'androidx.appcompat:appcompat:1.0.0'
|
||||
|
||||
// You need to build grpc-java to obtain these libraries below.
|
||||
implementation 'io.grpc:grpc-okhttp:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-stub:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-okhttp:1.61.1' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.61.1' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-stub:1.61.1' // CURRENT_GRPC_VERSION
|
||||
implementation 'org.apache.tomcat:annotations-api:6.0.53'
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ android {
|
|||
protobuf {
|
||||
protoc { artifact = 'com.google.protobuf:protoc:3.25.1' }
|
||||
plugins {
|
||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.1' // CURRENT_GRPC_VERSION
|
||||
}
|
||||
}
|
||||
generateProtoTasks {
|
||||
|
@ -52,8 +52,8 @@ dependencies {
|
|||
implementation 'androidx.appcompat:appcompat:1.0.0'
|
||||
|
||||
// You need to build grpc-java to obtain these libraries below.
|
||||
implementation 'io.grpc:grpc-okhttp:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-stub:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-okhttp:1.61.1' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.61.1' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-stub:1.61.1' // CURRENT_GRPC_VERSION
|
||||
implementation 'org.apache.tomcat:annotations-api:6.0.53'
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ android {
|
|||
protobuf {
|
||||
protoc { artifact = 'com.google.protobuf:protoc:3.25.1' }
|
||||
plugins {
|
||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.1' // CURRENT_GRPC_VERSION
|
||||
}
|
||||
}
|
||||
generateProtoTasks {
|
||||
|
@ -53,8 +53,8 @@ dependencies {
|
|||
implementation 'androidx.appcompat:appcompat:1.0.0'
|
||||
|
||||
// You need to build grpc-java to obtain these libraries below.
|
||||
implementation 'io.grpc:grpc-okhttp:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-stub:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-okhttp:1.61.1' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.61.1' // CURRENT_GRPC_VERSION
|
||||
implementation 'io.grpc:grpc-stub:1.61.1' // CURRENT_GRPC_VERSION
|
||||
implementation 'org.apache.tomcat:annotations-api:6.0.53'
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ java {
|
|||
|
||||
// Feel free to delete the comment at the next line. It is just for safely
|
||||
// updating the version in our release process.
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protobufVersion = '3.25.1'
|
||||
def protocVersion = protobufVersion
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ java {
|
|||
|
||||
// Feel free to delete the comment at the next line. It is just for safely
|
||||
// updating the version in our release process.
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.25.1'
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -25,7 +25,7 @@ java {
|
|||
|
||||
// Feel free to delete the comment at the next line. It is just for safely
|
||||
// updating the version in our release process.
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protobufVersion = '3.25.1'
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
<packaging>jar</packaging>
|
||||
<!-- Feel free to delete the comment at the end of these lines. It is just
|
||||
for safely updating the version in our release process. -->
|
||||
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<name>example-debug</name>
|
||||
<url>https://github.com/grpc/grpc-java</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protoc.version>3.25.1</protoc.version>
|
||||
<!-- required for jdk9 -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
|
|
|
@ -24,7 +24,7 @@ java {
|
|||
|
||||
// Feel free to delete the comment at the next line. It is just for safely
|
||||
// updating the version in our release process.
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protobufVersion = '3.25.1'
|
||||
def protocVersion = protobufVersion
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
<packaging>jar</packaging>
|
||||
<!-- Feel free to delete the comment at the end of these lines. It is just
|
||||
for safely updating the version in our release process. -->
|
||||
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<name>example-gauth</name>
|
||||
<url>https://github.com/grpc/grpc-java</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protobuf.version>3.25.1</protobuf.version>
|
||||
<!-- required for jdk9 -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
|
|
|
@ -25,7 +25,7 @@ java {
|
|||
|
||||
// Feel free to delete the comment at the next line. It is just for safely
|
||||
// updating the version in our release process.
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.25.1'
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -23,7 +23,7 @@ java {
|
|||
|
||||
// Feel free to delete the comment at the next line. It is just for safely
|
||||
// updating the version in our release process.
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protobufVersion = '3.25.1'
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
<packaging>jar</packaging>
|
||||
<!-- Feel free to delete the comment at the end of these lines. It is just
|
||||
for safely updating the version in our release process. -->
|
||||
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<name>example-hostname</name>
|
||||
<url>https://github.com/grpc/grpc-java</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protoc.version>3.25.1</protoc.version>
|
||||
<!-- required for jdk9 -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
|
|
|
@ -23,7 +23,7 @@ java {
|
|||
|
||||
// Feel free to delete the comment at the next line. It is just for safely
|
||||
// updating the version in our release process.
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protobufVersion = '3.25.1'
|
||||
def protocVersion = protobufVersion
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
<packaging>jar</packaging>
|
||||
<!-- Feel free to delete the comment at the end of these lines. It is just
|
||||
for safely updating the version in our release process. -->
|
||||
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<name>example-jwt-auth</name>
|
||||
<url>https://github.com/grpc/grpc-java</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protobuf.version>3.25.1</protobuf.version>
|
||||
<protoc.version>3.25.1</protoc.version>
|
||||
<!-- required for jdk9 -->
|
||||
|
|
|
@ -23,7 +23,7 @@ java {
|
|||
|
||||
// Feel free to delete the comment at the next line. It is just for safely
|
||||
// updating the version in our release process.
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protobufVersion = '3.25.1'
|
||||
def protocVersion = protobufVersion
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
<packaging>jar</packaging>
|
||||
<!-- Feel free to delete the comment at the end of these lines. It is just
|
||||
for safely updating the version in our release process. -->
|
||||
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<name>example-oauth</name>
|
||||
<url>https://github.com/grpc/grpc-java</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protobuf.version>3.25.1</protobuf.version>
|
||||
<protoc.version>3.25.1</protoc.version>
|
||||
<!-- required for jdk9 -->
|
||||
|
|
|
@ -18,7 +18,7 @@ java {
|
|||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.25.1'
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -18,7 +18,7 @@ java {
|
|||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.25.1'
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -16,7 +16,7 @@ java {
|
|||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.25.1'
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -24,7 +24,7 @@ java {
|
|||
|
||||
// Feel free to delete the comment at the next line. It is just for safely
|
||||
// updating the version in our release process.
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.25.1'
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
<packaging>jar</packaging>
|
||||
<!-- Feel free to delete the comment at the end of these lines. It is just
|
||||
for safely updating the version in our release process. -->
|
||||
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<name>example-tls</name>
|
||||
<url>https://github.com/grpc/grpc-java</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protoc.version>3.25.1</protoc.version>
|
||||
<!-- required for jdk9 -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
|
|
|
@ -23,7 +23,7 @@ java {
|
|||
|
||||
// Feel free to delete the comment at the next line. It is just for safely
|
||||
// updating the version in our release process.
|
||||
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.25.1'
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
<packaging>jar</packaging>
|
||||
<!-- Feel free to delete the comment at the end of these lines. It is just
|
||||
for safely updating the version in our release process. -->
|
||||
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
|
||||
<name>examples</name>
|
||||
<url>https://github.com/grpc/grpc-java</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protobuf.version>3.25.1</protobuf.version>
|
||||
<protoc.version>3.25.1</protoc.version>
|
||||
<!-- required for JDK 8 -->
|
||||
|
|
|
@ -1098,6 +1098,7 @@ class OkHttpClientTransport implements ConnectionClientTransport, TransportExcep
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("Finally")
|
||||
public void run() {
|
||||
String threadName = Thread.currentThread().getName();
|
||||
Thread.currentThread().setName("OkHttpClientTransport");
|
||||
|
@ -1130,6 +1131,15 @@ class OkHttpClientTransport implements ConnectionClientTransport, TransportExcep
|
|||
frameReader.close();
|
||||
} catch (IOException ex) {
|
||||
log.log(Level.INFO, "Exception closing frame reader", ex);
|
||||
} catch (RuntimeException e) {
|
||||
// This same check is done in okhttp proper:
|
||||
// https://github.com/square/okhttp/blob/3cc0f4917cbda03cb31617f8ead1e0aeb19de2fb/okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt#L270
|
||||
|
||||
// Conscrypt in Android 10 and 11 may throw closing an SSLSocket. This is safe to ignore.
|
||||
// https://issuetracker.google.com/issues/177450597
|
||||
if (!"bio == null".equals(e.getMessage())) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
listener.transportTerminated();
|
||||
Thread.currentThread().setName(threadName);
|
||||
|
|
|
@ -378,6 +378,9 @@ final class WeightedRoundRobinLoadBalancer extends RoundRobinLoadBalancer {
|
|||
WeightedChildLbState wChild = (WeightedChildLbState) childLbState;
|
||||
PickResult pickResult = childLbState.getCurrentPicker().pickSubchannel(args);
|
||||
Subchannel subchannel = pickResult.getSubchannel();
|
||||
if (subchannel == null) {
|
||||
return pickResult;
|
||||
}
|
||||
if (!enableOobLoadReport) {
|
||||
return PickResult.withSubchannel(subchannel,
|
||||
OrcaPerRequestUtil.getInstance().newOrcaClientStreamTracerFactory(
|
||||
|
|
|
@ -47,6 +47,7 @@ import io.grpc.LoadBalancer.ResolvedAddresses;
|
|||
import io.grpc.LoadBalancer.Subchannel;
|
||||
import io.grpc.LoadBalancer.SubchannelPicker;
|
||||
import io.grpc.LoadBalancer.SubchannelStateListener;
|
||||
import io.grpc.Status;
|
||||
import io.grpc.SynchronizationContext;
|
||||
import io.grpc.internal.FakeClock;
|
||||
import io.grpc.internal.TestUtils;
|
||||
|
@ -162,6 +163,22 @@ public class WeightedRoundRobinLoadBalancerTest {
|
|||
verify(helper, times(3)).createSubchannel(any(CreateSubchannelArgs.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pickChildLbTF() throws Exception {
|
||||
syncContext.execute(() -> wrr.acceptResolvedAddresses(ResolvedAddresses.newBuilder()
|
||||
.setAddresses(servers.subList(0, 1)).setLoadBalancingPolicyConfig(weightedConfig)
|
||||
.setAttributes(affinity).build()));
|
||||
Iterator<Subchannel> it = subchannels.values().iterator();
|
||||
Subchannel readySubchannel1 = it.next();
|
||||
getSubchannelStateListener(readySubchannel1).onSubchannelState(ConnectivityStateInfo
|
||||
.forTransientFailure(Status.UNAVAILABLE));
|
||||
verify(helper).updateBalancingState(
|
||||
eq(ConnectivityState.TRANSIENT_FAILURE), pickerCaptor.capture());
|
||||
final WeightedRoundRobinPicker weightedPicker =
|
||||
(WeightedRoundRobinPicker) pickerCaptor.getValue();
|
||||
weightedPicker.pickSubchannel(mockArgs);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void wrrLifeCycle() {
|
||||
syncContext.execute(() -> wrr.acceptResolvedAddresses(ResolvedAddresses.newBuilder()
|
||||
|
|
|
@ -3010,10 +3010,10 @@ public abstract class XdsClientImplTestBase {
|
|||
+ "Cluster cluster.googleapis.com2: unspecified cluster discovery type";
|
||||
call.verifyRequestNack(CDS, Arrays.asList(CDS_RESOURCE, anotherCdsResource), VERSION_1, "0001",
|
||||
NODE, Arrays.asList(errorMsg));
|
||||
verify(anotherWatcher).onResourceDoesNotExist(eq(anotherCdsResource));
|
||||
barrier.await();
|
||||
latch.await(10, TimeUnit.SECONDS);
|
||||
verify(cdsResourceWatcher, times(2)).onChanged(any());
|
||||
verify(anotherWatcher).onResourceDoesNotExist(eq(anotherCdsResource));
|
||||
verify(anotherWatcher).onError(any());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue