Galsza commented on code in PR #4380:
URL: https://github.com/apache/ozone/pull/4380#discussion_r1138693707
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/StorageContainerServiceProviderImpl.java:
##########
@@ -198,14 +198,18 @@ connectionFactory, getScmDBSnapshotUrl(),
ScmConfigKeys.OZONE_SCM_GRPC_PORT_KEY,
ScmConfigKeys.OZONE_SCM_GRPC_PORT_DEFAULT);
- try (SCMSnapshotDownloader downloadClient = new InterSCMGrpcClient(
- hostAddress, grpcPort, configuration,
- new ReconCertificateClient(new SecurityConfig(configuration),
- reconStorage, null, null))) {
- downloadClient.download(targetFile.toPath()).get();
- } catch (ExecutionException | InterruptedException e) {
- LOG.error("Rocks DB checkpoint downloading failed", e);
- throw new IOException(e);
+ SecurityConfig secConf = new SecurityConfig(configuration);
+ try (ReconCertificateClient certClient =
+ new ReconCertificateClient(
+ secConf, reconStorage, null, null)) {
+ try (
Review Comment:
nit: I'm fine with the nested try catch block, but is there an advantage to
it compared to the try with multiple resources version? Either way is ok to me.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]