Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util:Remove Unused experimental API ManagedChannelBuilder.enableFullStreamDecompression #10744

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions api/src/main/java/io/grpc/ForwardingChannelBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ public T defaultLoadBalancingPolicy(String policy) {
return thisT();
}

@Override
public T enableFullStreamDecompression() {
delegate().enableFullStreamDecompression();
return thisT();
}

@Override
public T decompressorRegistry(DecompressorRegistry registry) {
delegate().decompressorRegistry(registry);
Expand Down
6 changes: 0 additions & 6 deletions api/src/main/java/io/grpc/ForwardingChannelBuilder2.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ public T defaultLoadBalancingPolicy(String policy) {
return thisT();
}

@Override
public T enableFullStreamDecompression() {
delegate().enableFullStreamDecompression();
return thisT();
}

@Override
public T decompressorRegistry(DecompressorRegistry registry) {
delegate().decompressorRegistry(registry);
Expand Down
16 changes: 0 additions & 16 deletions api/src/main/java/io/grpc/ManagedChannelBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,22 +258,6 @@ public T defaultLoadBalancingPolicy(String policy) {
throw new UnsupportedOperationException();
}

/**
* Enables full-stream decompression of inbound streams. This will cause the channel's outbound
* headers to advertise support for GZIP compressed streams, and gRPC servers which support the
* feature may respond with a GZIP compressed stream.
*
* <p>EXPERIMENTAL: This method is here to enable an experimental feature, and may be changed or
* removed once the feature is stable.
*
* @throws UnsupportedOperationException if unsupported
* @since 1.7.0
*/
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/3399")
public T enableFullStreamDecompression() {
throw new UnsupportedOperationException();
}

/**
* Set the decompression registry for use in the channel. This is an advanced API call and
* shouldn't be used unless you are using custom message encoding. The default supported
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,6 @@ public ManagedChannelImplBuilder defaultLoadBalancingPolicy(String policy) {
return this;
}

@Override
public ManagedChannelImplBuilder enableFullStreamDecompression() {
this.fullStreamDecompression = true;
return this;
}

@Override
public ManagedChannelImplBuilder decompressorRegistry(DecompressorRegistry registry) {
if (registry != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,6 @@ public void fullStreamDecompression_default() {
assertFalse(builder.fullStreamDecompression);
}

@Test
public void fullStreamDecompression_enabled() {
assertEquals(builder, builder.enableFullStreamDecompression());
assertTrue(builder.fullStreamDecompression);
}

@Test
public void decompressorRegistry_default() {
assertNotNull(builder.decompressorRegistry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public static void main(String[] args) throws Exception {
private String defaultServiceAccount;
private String serviceAccountKeyFile;
private String oauthScope;
private boolean fullStreamDecompression;
private int localHandshakerPort = -1;
private Map<String, ?> serviceConfig = null;
private int soakIterations = 10;
Expand Down Expand Up @@ -159,8 +158,6 @@ void parseArgs(String[] args) throws Exception {
serviceAccountKeyFile = value;
} else if ("oauth_scope".equals(key)) {
oauthScope = value;
} else if ("full_stream_decompression".equals(key)) {
fullStreamDecompression = Boolean.parseBoolean(value);
} else if ("local_handshaker_port".equals(key)) {
localHandshakerPort = Integer.parseInt(value);
} else if ("service_config_json".equals(key)) {
Expand Down Expand Up @@ -226,8 +223,6 @@ void parseArgs(String[] args) throws Exception {
+ "\n --service_account_key_file Path to service account json key file."
+ c.serviceAccountKeyFile
+ "\n --oauth_scope Scope for OAuth tokens. Default " + c.oauthScope
+ "\n --full_stream_decompression Enable full-stream decompression. Default "
+ c.fullStreamDecompression
+ "\n --service_config_json=SERVICE_CONFIG_JSON"
+ "\n Disables service config lookups and sets the provided "
+ "\n string as the default service config."
Expand Down Expand Up @@ -638,9 +633,6 @@ protected ManagedChannelBuilder<?> createChannelBuilder() {
if (serverHostOverride != null) {
nettyBuilder.overrideAuthority(serverHostOverride);
}
if (fullStreamDecompression) {
nettyBuilder.enableFullStreamDecompression();
}
// Disable the default census stats interceptor, use testing interceptor instead.
InternalNettyChannelBuilder.setStatsEnabled(nettyBuilder, false);
if (serviceConfig != null) {
Expand All @@ -664,9 +656,6 @@ protected ManagedChannelBuilder<?> createChannelBuilder() {
okBuilder.overrideAuthority(
GrpcUtil.authorityFromHostAndPort(serverHostOverride, serverPort));
}
if (fullStreamDecompression) {
okBuilder.enableFullStreamDecompression();
}
// Disable the default census stats interceptor, use testing interceptor instead.
InternalOkHttpChannelBuilder.setStatsEnabled(okBuilder, false);
if (serviceConfig != null) {
Expand Down