Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6570a72
HDDS-6114. Intermittent error due to Failed to init RocksDB
adoroszlai Dec 17, 2021
21b20a0
Reserve ports for inactive HA services
adoroszlai Dec 24, 2021
b310059
Merge remote-tracking branch 'origin/master' into HDDS-6114
adoroszlai Dec 24, 2021
093b985
Get rid of MiniOzoneOMHAClusterImpl
adoroszlai Dec 24, 2021
4896d26
OM RPC server is started at creation time, cannot reserve port until …
adoroszlai Dec 24, 2021
089b489
TEMP - only run integration tests
adoroszlai Dec 24, 2021
c6a6d95
May have OM HA with single node
adoroszlai Dec 24, 2021
57b5f5e
--wip-- [skip ci]
adoroszlai Dec 24, 2021
ad4045a
release ports of active services earlier
adoroszlai Dec 25, 2021
1a8b02a
revert debug
adoroszlai Dec 25, 2021
0c3c67e
Fix SCM address in log message
adoroszlai Dec 25, 2021
fd469f0
Merge remote-tracking branch 'origin/master' into HDDS-6114
adoroszlai Dec 25, 2021
728423f
SCM also starts RPC services in constructor
adoroszlai Dec 26, 2021
56b0844
TEST 10x TestAddRemoveOzoneManager,TestOzoneManagerPrepare
adoroszlai Dec 26, 2021
cdaa772
Use reserved ports in addNewOMToConfig; fix inactive addInstance
adoroszlai Dec 26, 2021
c38762b
Run more tests
adoroszlai Dec 26, 2021
fc0c3f2
Revert "Run more tests"
adoroszlai Dec 26, 2021
fc258f0
Revert "TEST 10x TestAddRemoveOzoneManager,TestOzoneManagerPrepare"
adoroszlai Dec 26, 2021
98343b0
Revert "TEMP - only run integration tests"
adoroszlai Dec 26, 2021
a8bf72f
trigger new CI check
adoroszlai Dec 27, 2021
64045c6
trigger new CI check
adoroszlai Dec 27, 2021
76967d3
trigger new CI check
adoroszlai Dec 28, 2021
e83c606
Merge remote-tracking branch 'origin/master' into HDDS-6114
adoroszlai Jan 12, 2022
6e11a3b
Add comments
adoroszlai Jan 12, 2022
88303ac
Remove unused method
adoroszlai Jan 12, 2022
485bf20
Merge remote-tracking branch 'origin/master' into HDDS-6114
adoroszlai Jan 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import java.io.IOException;
import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -102,15 +101,13 @@ public static FailureService of(String serviceName) {

@SuppressWarnings("parameternumber")
public MiniOzoneChaosCluster(OzoneConfiguration conf,
List<OzoneManager> ozoneManagers, List<StorageContainerManager> scms,
List<HddsDatanodeService> hddsDatanodes, String omServiceID,
String scmServiceId, String clusterPath,
OMHAService omService, SCMHAService scmService,
List<HddsDatanodeService> hddsDatanodes, String clusterPath,
Set<Class<? extends Failures>> clazzes) {
super(conf, ozoneManagers, scms, hddsDatanodes, omServiceID, scmServiceId,
clusterPath);
super(conf, omService, scmService, hddsDatanodes, clusterPath, null);
this.numDatanodes = getHddsDatanodes().size();
this.numOzoneManagers = ozoneManagers.size();
this.numStorageContainerManagers = scms.size();
this.numOzoneManagers = omService.getServices().size();
this.numStorageContainerManagers = scmService.getServices().size();

this.failedOmSet = new HashSet<>();
this.failedDnSet = new HashSet<>();
Expand Down Expand Up @@ -304,33 +301,21 @@ public MiniOzoneChaosCluster build() throws IOException {
initOMRatisConf();
}

List<OzoneManager> omList;
List<StorageContainerManager> scmList;
SCMHAService scmService;
OMHAService omService;
try {
if (numOfSCMs > 1) {
scmList = createSCMService();
} else {
StorageContainerManager scm = createSCM();
scm.start();
scmList = Arrays.asList(scm);
}
if (numOfOMs > 1) {
omList = createOMService();
} else {
OzoneManager om = createOM();
om.start();
omList = Arrays.asList(om);
}
scmService = createSCMService();
omService = createOMService();
} catch (AuthenticationException ex) {
throw new IOException("Unable to build MiniOzoneCluster. ", ex);
}

final List<HddsDatanodeService> hddsDatanodes = createHddsDatanodes(
scmList, null);
scmService.getActiveServices(), null);

MiniOzoneChaosCluster cluster =
new MiniOzoneChaosCluster(conf, omList, scmList, hddsDatanodes,
omServiceId, scmServiceId, path, clazzes);
new MiniOzoneChaosCluster(conf, omService, scmService, hddsDatanodes,
path, clazzes);

if (startDataNodes) {
cluster.startHddsDatanodes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.hdds.scm.ScmConfigKeys;
import org.apache.hadoop.ozone.MiniOzoneCluster;
import org.apache.hadoop.ozone.MiniOzoneOMHAClusterImpl;
import org.apache.hadoop.ozone.MiniOzoneHAClusterImpl;
import org.apache.hadoop.ozone.OzoneConsts;
import org.apache.hadoop.ozone.client.ObjectStore;
import org.apache.hadoop.ozone.client.OzoneClientFactory;
Expand Down Expand Up @@ -167,7 +167,7 @@ public static void shutdown() {
* @return the leader OM's RPC address in the MiniOzoneHACluster
*/
private String getLeaderOMNodeAddr() {
MiniOzoneOMHAClusterImpl haCluster = (MiniOzoneOMHAClusterImpl) cluster;
MiniOzoneHAClusterImpl haCluster = (MiniOzoneHAClusterImpl) cluster;
OzoneManager omLeader = haCluster.getOMLeader();
Assert.assertNotNull("There should be a leader OM at this point.",
omLeader);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static Builder newBuilder(OzoneConfiguration conf) {
* @return MiniOzoneCluster builder
*/
static Builder newOMHABuilder(OzoneConfiguration conf) {
return new MiniOzoneOMHAClusterImpl.Builder(conf);
return new MiniOzoneHAClusterImpl.Builder(conf);
}

static Builder newHABuilder(OzoneConfiguration conf) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,6 @@ protected MiniOzoneClusterImpl(OzoneConfiguration conf,
this.reconServer = reconServer;
}

/**
* Creates a new MiniOzoneCluster without the OzoneManager. This is used by
* {@link MiniOzoneOMHAClusterImpl} for starting multiple OzoneManagers.
*
* @param conf
* @param scm
* @param hddsDatanodes
*/
MiniOzoneClusterImpl(OzoneConfiguration conf, StorageContainerManager scm,
List<HddsDatanodeService> hddsDatanodes, ReconServer reconServer) {
this.conf = conf;
this.scm = scm;
this.hddsDatanodes = hddsDatanodes;
this.reconServer = reconServer;
}

/**
* Creates a new MiniOzoneCluster without the OzoneManager and
* StorageContainerManager. This is used by
Expand Down
Loading