sreejasahithi commented on code in PR #8559:
URL: https://github.com/apache/ozone/pull/8559#discussion_r2135002365
##########
hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/container/CreateSubcommand.java:
##########
@@ -39,9 +44,18 @@ public class CreateSubcommand extends ScmSubcommand {
names = { "-o", "--owner"})
private String owner;
+ @CommandLine.Mixin
+ private ShellReplicationOptions containerReplicationOptions;
+
@Override
public void execute(ScmClient scmClient) throws IOException {
- ContainerWithPipeline container = scmClient.createContainer(owner);
+ ReplicationConfig replicationConfig =
containerReplicationOptions.fromParamsOrConfig(new OzoneConfiguration());
+ if (replicationConfig == null) {
+ // if replication options not provided via command then by default
STAND_ALONE container will be created.
Review Comment:
Adding a log message here will not show up in any of the service logs unless
we explicitly set OZONE_ROOT_LOGGER.
Instead, I’ve added the default behavior of command to the command’s
description so users are informed via the CLI help output.
--
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]