Skip to content

Commit 4005a10

Browse files
committed
HDDS-12376. (addendum: fix pmd) Remove scmRatisEnabled from ScmInfo. (apache#7931)
1 parent abfa3be commit 4005a10

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/StorageContainerServiceProviderImpl.java

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717

1818
package org.apache.hadoop.ozone.recon.spi.impl;
1919

20-
import static org.apache.hadoop.hdds.scm.server.SCMHTTPServerConfig.ConfigStrings.HDDS_SCM_HTTP_AUTH_TYPE;
2120
import static org.apache.hadoop.hdds.utils.HddsServerUtil.getScmSecurityClientWithMaxRetry;
22-
import static org.apache.hadoop.ozone.OzoneConsts.OZONE_DB_CHECKPOINT_HTTP_ENDPOINT;
2321
import static org.apache.hadoop.ozone.recon.ReconConstants.RECON_SCM_SNAPSHOT_DB;
2422
import static org.apache.hadoop.ozone.recon.ReconServerConfigKeys.OZONE_RECON_SCM_CONNECTION_REQUEST_TIMEOUT;
2523
import static org.apache.hadoop.ozone.recon.ReconServerConfigKeys.OZONE_RECON_SCM_CONNECTION_REQUEST_TIMEOUT_DEFAULT;
@@ -49,10 +47,8 @@
4947
import org.apache.hadoop.hdds.scm.pipeline.Pipeline;
5048
import org.apache.hadoop.hdds.scm.protocol.StorageContainerLocationProtocol;
5149
import org.apache.hadoop.hdds.security.SecurityConfig;
52-
import org.apache.hadoop.hdds.server.http.HttpConfig;
5350
import org.apache.hadoop.hdds.utils.db.DBCheckpoint;
5451
import org.apache.hadoop.hdds.utils.db.RocksDBCheckpoint;
55-
import org.apache.hadoop.hdfs.web.URLConnectionFactory;
5652
import org.apache.hadoop.ozone.ClientVersion;
5753
import org.apache.hadoop.ozone.recon.ReconContext;
5854
import 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

Comments
 (0)