This is an automated email from the ASF dual-hosted git repository.
bharat pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new cf9ff08 HDDS-1848. Fix TestOzoneManagerHA and
TestOzoneManagerSnapShotProvider. (#1148)
cf9ff08 is described below
commit cf9ff08f4b9fe71b86444d59796b6809296f35c3
Author: Bharat Viswanadham <[email protected]>
AuthorDate: Tue Jul 23 20:23:06 2019 -0700
HDDS-1848. Fix TestOzoneManagerHA and TestOzoneManagerSnapShotProvider.
(#1148)
---
.../src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java | 3 ++-
.../test/java/org/apache/hadoop/ozone/MiniOzoneHAClusterImpl.java | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java
index 1139a65..d3c9655 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java
@@ -234,6 +234,7 @@ public interface MiniOzoneCluster {
protected static final int DEFAULT_HB_INTERVAL_MS = 1000;
protected static final int DEFAULT_HB_PROCESSOR_INTERVAL_MS = 100;
+ protected static final int ACTIVE_OMS_NOT_SET = -1;
protected final OzoneConfiguration conf;
protected final String path;
@@ -241,7 +242,7 @@ public interface MiniOzoneCluster {
protected String clusterId;
protected String omServiceId;
protected int numOfOMs;
- protected int numOfActiveOMs;
+ protected int numOfActiveOMs = ACTIVE_OMS_NOT_SET;
protected Optional<Boolean> enableTrace = Optional.of(false);
protected Optional<Integer> hbInterval = Optional.empty();
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneHAClusterImpl.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneHAClusterImpl.java
index 1d9a99e..58675e6 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneHAClusterImpl.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneHAClusterImpl.java
@@ -169,6 +169,11 @@ public final class MiniOzoneHAClusterImpl extends
MiniOzoneClusterImpl {
throw new IllegalArgumentException("Number of active OMs cannot be " +
"more than the total number of OMs");
}
+
+ // If num of ActiveOMs is not set, set it to numOfOMs.
+ if (numOfActiveOMs == ACTIVE_OMS_NOT_SET) {
+ numOfActiveOMs = numOfOMs;
+ }
DefaultMetricsSystem.setMiniClusterMode(true);
initializeConfiguration();
StorageContainerManager scm;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]