elek commented on a change in pull request #2136:
URL: https://github.com/apache/ozone/pull/2136#discussion_r625036380
##########
File path:
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/keys/CopyKeyHandler.java
##########
@@ -82,17 +84,19 @@ protected void execute(OzoneClient client, OzoneAddress
address)
OzoneVolume vol = client.getObjectStore().getVolume(volumeName);
OzoneBucket bucket = vol.getBucket(bucketName);
- if (replicationFactor == null) {
- replicationFactor = ReplicationFactor.valueOf(
- getConf().getInt(OZONE_REPLICATION, OZONE_REPLICATION_DEFAULT));
- }
-
if (replicationType == null) {
replicationType = ReplicationType.valueOf(
- getConf().get(OZONE_REPLICATION_TYPE,
- OZONE_REPLICATION_TYPE_DEFAULT));
+ getConf()
+ .get(OZONE_REPLICATION_TYPE, OZONE_REPLICATION_TYPE_DEFAULT));
}
+ if (replication == null) {
Review comment:
No. For client to server communication we use protobuf structures where
each of the fields (data/parity and fator/type) are serialized. String is used
only to easily select the right `ReplicationConfiguration` instance.
Please also note that for `RatisReplicationConfig` and
`StandaloneReplicationConfig` the string is converted to an enum.
For the client parameter we need a string as we don't know how the value is
parsed. It depends on the `ReplicationConfig` implementation.
However, the string parsing in `ECReplicationConfig` can be more strict. We
can fix which data/parity pairs are acceptable today (with either enum or some
rules) I didn't do in this patch as it can make the testing harder in current
phase. Today I can create pipeline where data=2 parity=1. It's not something
good for production but for testing it requires only 3 nodes.
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]