fapifta commented on code in PR #4380:
URL: https://github.com/apache/ozone/pull/4380#discussion_r1151901203
##########
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:
Yes, nice catch, and you are right, there is no reason to keep these two in
separate try-with-resources constructs, I just blindly applied the solution to
add a try ( before the client creation and the rest, and did not noticed the
internal try-with-resources. Fixing this one as well shortly.
--
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]