[ 
https://issues.apache.org/jira/browse/HDDS-2589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16993163#comment-16993163
 ] 

Xiang Zhang commented on HDDS-2589:
-----------------------------------

[~elek] I have replicated this problem, is this intentional ? If not, please 
assign this to me [~adoroszlai]

> Ozone Shell PutKeyHandler inconsistent config override
> ------------------------------------------------------
>
>                 Key: HDDS-2589
>                 URL: https://issues.apache.org/jira/browse/HDDS-2589
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone CLI
>            Reporter: Attila Doroszlai
>            Priority: Minor
>              Labels: newbie
>
> Ozone Shell allows overriding config file via {{\-conf <filename>}} option, 
> and also specific settings via {{\-\-set key=value}}. This is partly ignored 
> by {{PutKeyHandler}} (which implements {{ozone sh key put}}). By [creating a 
> new config 
> object|https://github.com/apache/hadoop-ozone/blob/b1ac520ed95fe35b454e55695a05ed71299d8797/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/keys/PutKeyHandler.java#L101]
>  instead of using the one from the [factory method 
> {{createOzoneConfiguration()}}|https://github.com/apache/hadoop-ozone/blob/b1ac520ed95fe35b454e55695a05ed71299d8797/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/keys/PutKeyHandler.java#L80],
>  it bypasses the config set via command-line. This affects the following 
> settings: replication factor and type, chunk size (used only for client-side 
> buffer sizing).
> The goal of this task is to first clarify if this is intentional. Then, if it 
> is not, the fix is simple:
>  * save the object from {{createOzoneConfiguration()}} call to the local 
> variable {{conf}}
>  * remove {{new OzoneConfiguration()}} call
> To confirm the difference in config override handling:
>  * {{ozone sh \-\-set ozone.om.address=no-such-host key put vol1/bucket1/asdf 
> /etc/passwd}} fails due to unknown host for OM, so it respects the setting
>  * {{ozone sh \-\-set ozone.replication.type=STAND_ALONE key put 
> vol1/bucket1/asdf /etc/passwd}} creates a key with RATIS replication despite 
> the setting to use STAND_ALONE replication
> CC [~elek] for input on whether this is intentional or can be fixed



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to