You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/08/09 09:17:34 UTC

[GitHub] [ozone] ChenSammi commented on a change in pull request #2360: HDDS-5188. Replace GRPC based closed-container replication with Netty based streaming

ChenSammi commented on a change in pull request #2360:
URL: https://github.com/apache/ozone/pull/2360#discussion_r685034118



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeStateMachine.java
##########
@@ -155,17 +156,30 @@ public DatanodeStateMachine(DatanodeDetails datanodeDetails,
     dnCertClient = certClient;
     nextHB = new AtomicLong(Time.monotonicNow());
 
+    SslContext sslContext = null;
+    SecurityConfig securityConfig = new SecurityConfig(conf);
+    if (securityConfig.isSecurityEnabled()) {
+
+      sslContext = SslContextBuilder.forClient()
+          .trustManager(certClient.getCACertificate())
+          .clientAuth(ClientAuth.REQUIRE)
+          .keyManager(certClient.getPrivateKey(), certClient.getCertificate())
+          .build();
+
+    }
+
     ContainerReplicator replicator =
-        new DownloadAndImportReplicator(container.getContainerSet(),
-            container.getController(),
-            new SimpleContainerDownloader(conf, dnCertClient),
-            new TarContainerPacker());
+        new DownloadAndImportReplicator(conf,
+            container::getClusterId,
+            container.getContainerSet(),
+            container.getVolumeSet(),
+            sslContext);
 
     replicatorMetrics = new MeasuredReplicator(replicator);
 
     supervisor =
-        new ReplicationSupervisor(container.getContainerSet(), context,
-            replicatorMetrics, dnConf.getReplicationMaxStreams());
+        new ReplicationSupervisor(container.getContainerSet(), replicator,
+            dnConf.getReplicationMaxStreams());

Review comment:
       Will this lead to replicatorMetrics never be used? 




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org