adoroszlai commented on a change in pull request #363: HDDS-2679. Ratis ring creation might be failed with async pipeline creation. URL: https://github.com/apache/hadoop-ozone/pull/363#discussion_r358905363
########## File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/CreatePipelineCommandHandler.java ########## @@ -48,13 +59,25 @@ private static final Logger LOG = LoggerFactory.getLogger(CreatePipelineCommandHandler.class); - private AtomicLong invocationCount = new AtomicLong(0); + private final AtomicLong invocationCount = new AtomicLong(0); + private final String rpcType; + private final RetryPolicy retryPolicy; + private final TimeDuration requestTimeout; + private final int maxOutstandingRequest; + private long totalTime; /** * Constructs a createPipelineCommand handler. */ - public CreatePipelineCommandHandler() { + public CreatePipelineCommandHandler(Configuration conf) { + this.rpcType = conf + .get(ScmConfigKeys.DFS_CONTAINER_RATIS_RPC_TYPE_KEY, + ScmConfigKeys.DFS_CONTAINER_RATIS_RPC_TYPE_DEFAULT); + this.maxOutstandingRequest = HddsClientUtils + .getMaxOutstandingRequests(conf); + this.retryPolicy = RatisHelper.createRetryPolicy(conf); + this.requestTimeout = RatisHelper.getClientRequestTimeout(conf); Review comment: Instead of duplicating these from `XceiverClientRatis`, would it make sense to improve `RatisHelper` with a `conf`-aware client creation method? Also, for a throwaway client, `maxOutstandingRequest` may not even matter. ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org