Skip to content

Commit

Permalink
Resolve rebase conflict.
Browse files Browse the repository at this point in the history
  • Loading branch information
timmylicheng committed Jan 7, 2020
1 parent acc9640 commit cc0060c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void testPipelineDatanodesIntersection() {
NodeManager nodeManager= new MockNodeManager(true, nodeCount);
conf.setInt(OZONE_DATANODE_MAX_PIPELINE_ENGAGEMENT, nodeHeaviness);
conf.setBoolean(OZONE_SCM_PIPELINE_AUTO_CREATE_FACTOR_ONE, false);
PipelineStateManager stateManager = new PipelineStateManager(conf);
PipelineStateManager stateManager = new PipelineStateManager();
PipelineProvider provider = new MockRatisPipelineProvider(nodeManager,
stateManager, conf);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void init() throws Exception {
conf = new OzoneConfiguration();
conf.setInt(OZONE_DATANODE_MAX_PIPELINE_ENGAGEMENT, 5);
placementPolicy = new PipelinePlacementPolicy(
nodeManager, new PipelineStateManager(conf), conf);
nodeManager, new PipelineStateManager(), conf);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
import java.util.stream.Collectors;

import static org.apache.commons.collections.CollectionUtils.intersection;
import static org.apache.hadoop.hdds.scm.ScmConfigKeys.OZONE_DATANODE_MAX_PIPELINE_ENGAGEMENT;
import static org.apache.hadoop.hdds.scm.ScmConfigKeys.OZONE_DATANODE_MAX_PIPELINE_ENGAGEMENT_DEFAULT;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
Expand All @@ -57,12 +55,14 @@ public class TestRatisPipelineProvider {
private PipelineProvider provider;
private PipelineStateManager stateManager;
private OzoneConfiguration conf;
private int maxPipelinePerNode = 2;

@Before
public void init() throws Exception {
nodeManager = new MockNodeManager(true, 10);
OzoneConfiguration conf = new OzoneConfiguration();
conf.setInt(ScmConfigKeys.OZONE_DATANODE_MAX_PIPELINE_ENGAGEMENT, 2);
conf = new OzoneConfiguration();
conf.setInt(ScmConfigKeys.OZONE_DATANODE_MAX_PIPELINE_ENGAGEMENT,
maxPipelinePerNode);
stateManager = new PipelineStateManager();
provider = new MockRatisPipelineProvider(nodeManager,
stateManager, conf);
Expand Down Expand Up @@ -194,8 +194,7 @@ public void testCreatePipelinesDnExclude() throws IOException {

// Use up first 3 DNs for an open pipeline.
List<DatanodeDetails> dns = healthyNodes.subList(0, 3);
for (int i = 0; i < conf.getInt(OZONE_DATANODE_MAX_PIPELINE_ENGAGEMENT,
OZONE_DATANODE_MAX_PIPELINE_ENGAGEMENT_DEFAULT); i++) {
for (int i = 0; i < maxPipelinePerNode; i++) {
// Saturate pipeline counts on all the 1st 3 DNs.
addPipeline(dns, factor, Pipeline.PipelineState.OPEN, REPLICATION_TYPE);
}
Expand Down

0 comments on commit cc0060c

Please sign in to comment.