lokeshj1703 commented on code in PR #3564:
URL: https://github.com/apache/ozone/pull/3564#discussion_r911755393
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMClientProtocolServer.java:
##########
@@ -200,14 +201,18 @@ public ContainerWithPipeline
allocateContainer(HddsProtos.ReplicationType
ResultCodes.SAFE_MODE_EXCEPTION);
}
getScm().checkAdminAccess(getRemoteUser());
-
- final ContainerInfo container = scm.getContainerManager()
- .allocateContainer(
- ReplicationConfig.fromProtoTypeAndFactor(replicationType, factor),
- owner);
- final Pipeline pipeline = scm.getPipelineManager()
- .getPipeline(container.getPipelineID());
- return new ContainerWithPipeline(container, pipeline);
+ try {
+ final ContainerInfo container = scm.getContainerManager()
+ .allocateContainer(
+ ReplicationConfig.fromProtoTypeAndFactor(replicationType,
factor),
+ owner);
+ final Pipeline pipeline = scm.getPipelineManager()
+ .getPipeline(container.getPipelineID());
+ return new ContainerWithPipeline(container, pipeline);
+ } catch (TimeoutException e) {
+ throw new SCMException("Allocate Container TimeoutException",
+ ResultCodes.INTERNAL_ERROR);
Review Comment:
After internal discussion, new Result code is not required since client
retries on TimeoutException.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]