mridulm commented on code in PR #2419:
URL: https://github.com/apache/celeborn/pull/2419#discussion_r1539432618


##########
common/src/main/java/org/apache/celeborn/common/network/ssl/ReloadingX509TrustManager.java:
##########
@@ -0,0 +1,218 @@
+/*
+ * 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.celeborn.common.network.ssl;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.security.KeyStore;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+import java.util.concurrent.atomic.AtomicReference;
+
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.TrustManagerFactory;
+import javax.net.ssl.X509TrustManager;
+
+import com.google.common.annotations.VisibleForTesting;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A {@link TrustManager} implementation that reloads its configuration when 
the truststore file on
+ * disk changes. This implementation is based off of the
+ * org.apache.hadoop.security.ssl.ReloadingX509TrustManager class in the 
Apache Hadoop Encrypted
+ * Shuffle implementation.
+ *
+ * @see <a
+ *     
href="https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/EncryptedShuffle.html";>Hadoop
+ *     MapReduce Next Generation - Encrypted Shuffle</a>
+ */
+public class ReloadingX509TrustManager implements X509TrustManager, Runnable {

Review Comment:
   This file, and its companion `ReloadingX509TrustManagerSuiteJ.java` are 
pretty much the same as in Apache Spark - except for spotless related changes, 
package name change.



-- 
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