[ https://issues.apache.org/jira/browse/HDDS-1406?focusedWorklogId=243536&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-243536 ]
ASF GitHub Bot logged work on HDDS-1406: ---------------------------------------- Author: ASF GitHub Bot Created on: 16/May/19 18:21 Start Date: 16/May/19 18:21 Worklog Time Spent: 10m Work Description: bharatviswa504 commented on pull request #714: HDDS-1406. Avoid usage of commonPool in RatisPipelineUtils. URL: https://github.com/apache/hadoop/pull/714#discussion_r284837697 ########## File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/RatisPipelineProvider.java ########## @@ -24,35 +24,75 @@ import org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationFactor; import org.apache.hadoop.hdds.protocol.proto.HddsProtos.NodeState; import org.apache.hadoop.hdds.scm.ScmConfigKeys; +import org.apache.hadoop.hdds.scm.client.HddsClientUtils; import org.apache.hadoop.hdds.scm.container.placement.algorithms.ContainerPlacementPolicy; import org.apache.hadoop.hdds.scm.container.placement.algorithms.SCMContainerPlacementRandom; import org.apache.hadoop.hdds.scm.node.NodeManager; import org.apache.hadoop.hdds.scm.pipeline.Pipeline.PipelineState; +import org.apache.hadoop.hdds.security.x509.SecurityConfig; +import org.apache.hadoop.io.MultipleIOException; +import org.apache.ratis.RatisHelper; +import org.apache.ratis.client.RaftClient; +import org.apache.ratis.grpc.GrpcTlsConfig; +import org.apache.ratis.protocol.RaftClientReply; +import org.apache.ratis.protocol.RaftGroup; +import org.apache.ratis.protocol.RaftPeer; +import org.apache.ratis.retry.RetryPolicy; +import org.apache.ratis.rpc.SupportedRpcType; +import org.apache.ratis.util.TimeDuration; +import org.apache.ratis.util.function.CheckedBiConsumer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ForkJoinPool; +import java.util.concurrent.ForkJoinWorkerThread; +import java.util.concurrent.RejectedExecutionException; import java.util.stream.Collectors; /** * Implements Api for creating ratis pipelines. */ public class RatisPipelineProvider implements PipelineProvider { + private static final Logger LOG = + LoggerFactory.getLogger(RatisPipelineProvider.class); + private final NodeManager nodeManager; private final PipelineStateManager stateManager; private final Configuration conf; + // Set parallelism at 3, as now in Ratis we create 1 and 3 node pipelines. + private final int parallelisimForPool = 3; + + private final ForkJoinPool.ForkJoinWorkerThreadFactory factory = + (pool -> { + final ForkJoinWorkerThread worker = ForkJoinPool. + defaultForkJoinWorkerThreadFactory.newThread(pool); + worker.setName("ratisCreatePipeline" + worker.getPoolIndex()); Review comment: Done ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 243536) Time Spent: 9h (was: 8h 50m) > Avoid usage of commonPool in RatisPipelineUtils > ----------------------------------------------- > > Key: HDDS-1406 > URL: https://issues.apache.org/jira/browse/HDDS-1406 > Project: Hadoop Distributed Data Store > Issue Type: Bug > Reporter: Bharat Viswanadham > Assignee: Bharat Viswanadham > Priority: Major > Labels: pull-request-available > Time Spent: 9h > Remaining Estimate: 0h > > We use parallelStream in during createPipline, this internally uses > commonPool. Use Our own ForkJoinPool with parallelisim set with number of > processors. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org