HDDS-1076 introduced a new static variable in RatisPipelineProvider: Scheduler. It seems to be a global variable which makes the testing harder.
Shashikant Banerjee also suggested to remove it:
It would be a good idea to move the scheduler Class Utility into some common utility package so that it can be used in multiple places as and when needed.
I agree. And findbug also complains about it:
H D ST: Write to static field org.apache.hadoop.hdds.scm.pipeline.RatisPipelineProvider.scheduler from instance method new org.apache.hadoop.hdds.scm.pipeline.RatisPipelineProvider(NodeManager, PipelineStateManager, Configuration) At RatisPipelineProvider.java:[line 56]
I think we need a new class which includes both the state of RatisPipelineUtils.isPipelineCreatorRunning and RaitsPipelineProvider.Scheduler. It should have one instance which is available for the classes which requires it.