You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "whbing (via GitHub)" <gi...@apache.org> on 2023/02/09 07:44:30 UTC

[GitHub] [ozone] whbing commented on a diff in pull request #4262: HDDS-4223. Optimize the construction method of OzoneVolume and OzoneBucket.

whbing commented on code in PR #4262:
URL: https://github.com/apache/ozone/pull/4262#discussion_r1101080659


##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneBucket.java:
##########
@@ -1034,6 +889,135 @@ public boolean setOwner(String userName) throws IOException {
     return result;
   }
 
+  public static Builder newBuilder(ConfigurationSource conf,
+      ClientProtocol proxy) {
+    Preconditions.checkNotNull(proxy, "Client proxy is not set.");
+    return new Builder(conf, proxy);
+  }
+
+  /**
+   * Inner builder for OzoneBucket.
+   */
+  public static class Builder {
+    private Map<String, String> metadata;
+    private ConfigurationSource conf;
+    private ClientProtocol proxy;
+    private String volumeName;
+    private String name;
+    private DefaultReplicationConfig defaultReplicationConfig;

Review Comment:
   Note: The `DefaultReplicationConfig` type from the original constructor is retained. `ReplicationConfig` is also available.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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