You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/02/24 09:14:38 UTC

[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #590: HDDS-3049. Fix Replication factor passed in create API doesn't take effect

adoroszlai commented on a change in pull request #590: HDDS-3049. Fix Replication factor passed in create API doesn't take effect
URL: https://github.com/apache/hadoop-ozone/pull/590#discussion_r383142469
 
 

 ##########
 File path: hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneClientAdapterImpl.java
 ##########
 @@ -210,10 +210,14 @@ protected void incrementCounter(Statistic objectsRead) {
   }
 
   @Override
-  public OzoneFSOutputStream createFile(String key, boolean overWrite,
+  public OzoneFSOutputStream createFile(String key, short replication, boolean overWrite,
       boolean recursive) throws IOException {
     incrementCounter(Statistic.OBJECTS_CREATED);
     try {
+      if (replication == ReplicationFactor.ONE.getValue()
+          || replication == ReplicationFactor.THREE.getValue()) {
+        replicationFactor = ReplicationFactor.valueOf(replication);
 
 Review comment:
   `replicationFactor` can now be a local variable.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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