HDDS-762. Fix unit test failure for TestContainerSQLCli & TestSCMMetrics.
Contributed by Mukul Kumar Singh.
This commit is contained in:
parent
f747f5b06c
commit
e33b61f335
@ -45,7 +45,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<hdds.version>0.4.0-SNAPSHOT</hdds.version>
|
||||
|
||||
<!-- Apache Ratis version -->
|
||||
<ratis.version>0.3.0-2272086-SNAPSHOT</ratis.version>
|
||||
<ratis.version>0.3.0-1d2ebee-SNAPSHOT</ratis.version>
|
||||
|
||||
<bouncycastle.version>1.60</bouncycastle.version>
|
||||
|
||||
|
@ -47,6 +47,7 @@
|
||||
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
|
||||
|
||||
import static org.apache.ratis.rpc.SupportedRpcType.GRPC;
|
||||
import org.apache.ratis.protocol.RaftGroupId;
|
||||
import org.apache.ratis.util.CheckedBiConsumer;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
@ -104,7 +105,8 @@ static void runContainerStateMachineMetrics(
|
||||
client.connect();
|
||||
|
||||
// Before Read Chunk/Write Chunk
|
||||
MetricsRecordBuilder metric = getMetrics(CSMMetrics.SOURCE_NAME);
|
||||
MetricsRecordBuilder metric = getMetrics(CSMMetrics.SOURCE_NAME +
|
||||
RaftGroupId.valueOf(pipeline.getId().getId()).toString());
|
||||
assertCounter("NumWriteStateMachineOps", 0L, metric);
|
||||
assertCounter("NumReadStateMachineOps", 0L, metric);
|
||||
assertCounter("NumApplyTransactionOps", 0L, metric);
|
||||
@ -120,7 +122,8 @@ static void runContainerStateMachineMetrics(
|
||||
Assert.assertEquals(ContainerProtos.Result.SUCCESS,
|
||||
response.getResult());
|
||||
|
||||
metric = getMetrics(CSMMetrics.SOURCE_NAME);
|
||||
metric = getMetrics(CSMMetrics.SOURCE_NAME +
|
||||
RaftGroupId.valueOf(pipeline.getId().getId()).toString());
|
||||
assertCounter("NumWriteStateMachineOps", 1L, metric);
|
||||
assertCounter("NumApplyTransactionOps", 1L, metric);
|
||||
|
||||
@ -132,7 +135,8 @@ static void runContainerStateMachineMetrics(
|
||||
Assert.assertEquals(ContainerProtos.Result.SUCCESS,
|
||||
response.getResult());
|
||||
|
||||
metric = getMetrics(CSMMetrics.SOURCE_NAME);
|
||||
metric = getMetrics(CSMMetrics.SOURCE_NAME +
|
||||
RaftGroupId.valueOf(pipeline.getId().getId()).toString());
|
||||
assertCounter("NumReadStateMachineOps", 1L, metric);
|
||||
assertCounter("NumApplyTransactionOps", 1L, metric);
|
||||
} finally {
|
||||
|
@ -33,7 +33,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<hadoop.version>3.2.1-SNAPSHOT</hadoop.version>
|
||||
<hdds.version>0.4.0-SNAPSHOT</hdds.version>
|
||||
<ozone.version>0.4.0-SNAPSHOT</ozone.version>
|
||||
<ratis.version>0.3.0-2272086-SNAPSHOT</ratis.version>
|
||||
<ratis.version>0.3.0-1d2ebee-SNAPSHOT</ratis.version>
|
||||
<bouncycastle.version>1.60</bouncycastle.version>
|
||||
<ozone.release>Badlands</ozone.release>
|
||||
<declared.ozone.version>${ozone.version}</declared.ozone.version>
|
||||
|
@ -22,6 +22,7 @@
|
||||
import org.apache.hadoop.hdds.scm.events.SCMEvents;
|
||||
import org.apache.hadoop.hdds.scm.node.NodeManager;
|
||||
import org.apache.hadoop.hdds.scm.pipeline.PipelineManager;
|
||||
import org.apache.hadoop.hdds.scm.pipeline.SCMPipelineManager;
|
||||
import org.apache.hadoop.hdds.server.events.EventQueue;
|
||||
import org.apache.hadoop.ozone.MiniOzoneCluster;
|
||||
import org.apache.hadoop.ozone.OzoneConfigKeys;
|
||||
@ -122,7 +123,7 @@ public void setup() throws Exception {
|
||||
eventQueue = new EventQueue();
|
||||
nodeManager = cluster.getStorageContainerManager().getScmNodeManager();
|
||||
PipelineManager pipelineManager =
|
||||
cluster.getStorageContainerManager().getPipelineManager();
|
||||
new SCMPipelineManager(conf, nodeManager, eventQueue);
|
||||
containerManager = new SCMContainerManager(conf, nodeManager,
|
||||
pipelineManager, eventQueue);
|
||||
blockManager = new BlockManagerImpl(
|
||||
|
Loading…
Reference in New Issue
Block a user