damondouglas commented on code in PR #29081:
URL: https://github.com/apache/beam/pull/29081#discussion_r1367399842


##########
sdks/java/io/rrio/src/main/java/org/apache/beam/io/requestresponse/RedisClient.java:
##########
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.beam.io.requestresponse;
+
+import static org.apache.beam.sdk.util.Preconditions.checkStateNotNull;
+
+import java.net.URI;
+import java.nio.charset.StandardCharsets;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
+import org.checkerframework.checker.nullness.qual.NonNull;
+import org.joda.time.Duration;
+import redis.clients.jedis.JedisPooled;
+import redis.clients.jedis.exceptions.JedisException;
+
+/**
+ * {@link RedisClient} is a convenience class that supports operations needed 
for caching by various
+ * transforms in this package. It implements the {@link SetupTeardown} 
interface for ease-of-use
+ * within a {@link DoFn} context. Unlike the underlying {@link JedisPooled} 
client, {@link
+ * RedisClient} is {@link java.io.Serializable}.
+ */
+class RedisClient implements SetupTeardown {

Review Comment:
   They are needed as package private. Private would prevent their use by other 
classes in the `org.apache.beam.io.requestresponse` package. Public would 
expose it outside `org.apache.beam.io.requestresponse` and there isn't _yet_ a 
reason to do this. This class will be used by `CacheRead` and `CacheWrite`, for 
example, classes that are package private. Could you tell me why you think 
there might be value in making this public?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to