Skip to content
Merged
Changes from all commits
Commits
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 @@ -66,39 +66,6 @@ public class MiniOzoneChaosCluster extends MiniOzoneHAClusterImpl {
private final Set<StorageContainerManager> failedScmSet;
private final Set<DatanodeDetails> failedDnSet;

// The service on which chaos will be unleashed.
enum FailureService {
DATANODE,
OZONE_MANAGER,
STORAGE_CONTAINER_MANAGER;

@Override
public String toString() {
switch (this) {
case DATANODE:
return "Datanode";
case OZONE_MANAGER:
return "OzoneManager";
case STORAGE_CONTAINER_MANAGER:
return "StorageContainerManager";
default:
return "";
}
}

public static FailureService of(String serviceName) {
if (serviceName.equalsIgnoreCase("Datanode")) {
return DATANODE;
} else if (serviceName.equalsIgnoreCase("OzoneManager")) {
return OZONE_MANAGER;
} else if (serviceName.equalsIgnoreCase("StorageContainerManager")) {
return STORAGE_CONTAINER_MANAGER;
}
throw new IllegalArgumentException("Unrecognized value for " +
"FailureService enum: " + serviceName);
}
}

@SuppressWarnings("parameternumber")
public MiniOzoneChaosCluster(OzoneConfiguration conf,
OMHAService omService, SCMHAService scmService,
Expand Down