1717
1818package org .apache .hadoop .ozone .recon .spi .impl ;
1919
20- import static org .apache .hadoop .hdds .scm .server .SCMHTTPServerConfig .ConfigStrings .HDDS_SCM_HTTP_AUTH_TYPE ;
2120import static org .apache .hadoop .hdds .utils .HddsServerUtil .getScmSecurityClientWithMaxRetry ;
22- import static org .apache .hadoop .ozone .OzoneConsts .OZONE_DB_CHECKPOINT_HTTP_ENDPOINT ;
2321import static org .apache .hadoop .ozone .recon .ReconConstants .RECON_SCM_SNAPSHOT_DB ;
2422import static org .apache .hadoop .ozone .recon .ReconServerConfigKeys .OZONE_RECON_SCM_CONNECTION_REQUEST_TIMEOUT ;
2523import static org .apache .hadoop .ozone .recon .ReconServerConfigKeys .OZONE_RECON_SCM_CONNECTION_REQUEST_TIMEOUT_DEFAULT ;
4947import org .apache .hadoop .hdds .scm .pipeline .Pipeline ;
5048import org .apache .hadoop .hdds .scm .protocol .StorageContainerLocationProtocol ;
5149import org .apache .hadoop .hdds .security .SecurityConfig ;
52- import org .apache .hadoop .hdds .server .http .HttpConfig ;
5350import org .apache .hadoop .hdds .utils .db .DBCheckpoint ;
5451import org .apache .hadoop .hdds .utils .db .RocksDBCheckpoint ;
55- import org .apache .hadoop .hdfs .web .URLConnectionFactory ;
5652import org .apache .hadoop .ozone .ClientVersion ;
5753import org .apache .hadoop .ozone .recon .ReconContext ;
5854import org .apache .hadoop .ozone .recon .ReconUtils ;
@@ -74,9 +70,7 @@ public class StorageContainerServiceProviderImpl
7470 LoggerFactory .getLogger (StorageContainerServiceProviderImpl .class );
7571 private StorageContainerLocationProtocol scmClient ;
7672 private final OzoneConfiguration configuration ;
77- private String scmDBSnapshotUrl ;
7873 private File scmSnapshotDBParentDir ;
79- private URLConnectionFactory connectionFactory ;
8074 private ReconUtils reconUtils ;
8175 private ReconStorageConfig reconStorage ;
8276 private ReconContext reconContext ;
@@ -96,28 +90,9 @@ public StorageContainerServiceProviderImpl(
9690 OZONE_RECON_SCM_CONNECTION_REQUEST_TIMEOUT ,
9791 OZONE_RECON_SCM_CONNECTION_REQUEST_TIMEOUT_DEFAULT ,
9892 TimeUnit .MILLISECONDS );
99- connectionFactory =
100- URLConnectionFactory .newDefaultURLConnectionFactory (connectionTimeout ,
101- connectionRequestTimeout , configuration );
102-
103- String scmHttpAddress = configuration .get (ScmConfigKeys
104- .OZONE_SCM_HTTP_ADDRESS_KEY );
105-
106- String scmHttpsAddress = configuration .get (ScmConfigKeys
107- .OZONE_SCM_HTTPS_ADDRESS_KEY );
108-
109- HttpConfig .Policy policy = HttpConfig .getHttpPolicy (configuration );
11093
11194 scmSnapshotDBParentDir = ReconUtils .getReconScmDbDir (configuration );
11295
113- scmDBSnapshotUrl = "http://" + scmHttpAddress +
114- OZONE_DB_CHECKPOINT_HTTP_ENDPOINT ;
115-
116- if (policy .isHttpsEnabled ()) {
117- scmDBSnapshotUrl = "https://" + scmHttpsAddress +
118- OZONE_DB_CHECKPOINT_HTTP_ENDPOINT ;
119- }
120-
12196 this .reconUtils = reconUtils ;
12297 this .scmClient = scmClient ;
12398 this .configuration = configuration ;
@@ -165,15 +140,6 @@ public long getContainerCount(HddsProtos.LifeCycleState state)
165140 return scmClient .getContainerCount (state );
166141 }
167142
168- public String getScmDBSnapshotUrl () {
169- return scmDBSnapshotUrl ;
170- }
171-
172- private boolean isOmSpnegoEnabled () {
173- return configuration .get (HDDS_SCM_HTTP_AUTH_TYPE , "simple" )
174- .equals ("kerberos" );
175- }
176-
177143 @ Override
178144 public DBCheckpoint getSCMDBSnapshot () {
179145 String snapshotFileName = RECON_SCM_SNAPSHOT_DB + "_" +
0 commit comments