From 35c477a039c29d39da8f5e17306309d705f9c364 Mon Sep 17 00:00:00 2001 From: Sergii Tkachenko Date: Wed, 17 Jan 2024 11:35:59 -0800 Subject: [PATCH 1/2] services: Remove deprecated `io.grpc.services.BinaryLogs` Was deprecated more than 2 years ago in bab1fe3. `io.grpc.protobuf.services.BinaryLogs` should be used instead. Experimental tracking ticket: https://github.com/grpc/grpc-java/issues/4017 --- .../java/io/grpc/services/BinaryLogs.java | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 services/src/main/java/io/grpc/services/BinaryLogs.java diff --git a/services/src/main/java/io/grpc/services/BinaryLogs.java b/services/src/main/java/io/grpc/services/BinaryLogs.java deleted file mode 100644 index ad8a27c3290..00000000000 --- a/services/src/main/java/io/grpc/services/BinaryLogs.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2018, gRPC Authors All rights reserved. - * - * 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. - */ - -package io.grpc.services; - -import io.grpc.BinaryLog; -import io.grpc.ExperimentalApi; -import io.grpc.protobuf.services.BinaryLogSink; -import java.io.IOException; - -/** - * Utility class to create BinaryLog instances. - * - * @deprecated Use {@link io.grpc.protobuf.services.BinaryLogs} instead. - */ -@Deprecated -@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4017") -public final class BinaryLogs { - /** - * Creates a binary log that writes to a temp file. Warning: this implementation is - * not performance optimized, and RPCs will experience back pressure if disk IO does not keep - * up. - */ - public static BinaryLog createBinaryLog() throws IOException { - return io.grpc.protobuf.services.BinaryLogs.createBinaryLog(); - } - - /** - * Deprecated and will be removed in a future version of gRPC. - */ - @Deprecated - public static BinaryLog createBinaryLog(BinaryLogSink sink) throws IOException { - return io.grpc.protobuf.services.BinaryLogs.createBinaryLog(sink); - } - - /** - * Creates a binary log with a custom {@link BinaryLogSink} for receiving the logged data, - * and a config string as defined by - * - * A16-binary-logging. - */ - public static BinaryLog createBinaryLog(BinaryLogSink sink, String configStr) throws IOException { - return io.grpc.protobuf.services.BinaryLogs.createBinaryLog(sink, configStr); - } - - private BinaryLogs() {} -} From 6d96a4ee67f06aa20d10b091052f93e6dfc6dd24 Mon Sep 17 00:00:00 2001 From: Sergii Tkachenko Date: Wed, 17 Jan 2024 11:46:42 -0800 Subject: [PATCH 2/2] Remove //services:binarylog bazel target --- services/BUILD.bazel | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/services/BUILD.bazel b/services/BUILD.bazel index f4ec14cc255..fa708dd04b2 100644 --- a/services/BUILD.bazel +++ b/services/BUILD.bazel @@ -9,7 +9,6 @@ java_library( name = "services_maven", exports = [ ":admin", - ":binarylog", ":channelz", ":health", ":healthlb", @@ -62,29 +61,6 @@ java_library( ], ) -java_library( - name = "binarylog", - srcs = [ - "src/main/java/io/grpc/protobuf/services/BinaryLogProvider.java", - "src/main/java/io/grpc/protobuf/services/BinaryLogProviderImpl.java", - "src/main/java/io/grpc/protobuf/services/BinaryLogSink.java", - "src/main/java/io/grpc/protobuf/services/BinaryLogs.java", - "src/main/java/io/grpc/protobuf/services/BinlogHelper.java", - "src/main/java/io/grpc/protobuf/services/InetAddressUtil.java", - "src/main/java/io/grpc/protobuf/services/TempFileSink.java", - "src/main/java/io/grpc/services/BinaryLogs.java", - ], - deps = [ - "//api", - "//context", - "@com_google_code_findbugs_jsr305//jar", - "@com_google_guava_guava//jar", - "@com_google_protobuf//:protobuf_java", - "@com_google_protobuf//:protobuf_java_util", - "@io_grpc_grpc_proto//:binarylog_java_proto", - ], -) - java_library( name = "channelz", srcs = [