cdmikechen commented on code in PR #1020:
URL: https://github.com/apache/submarine/pull/1020#discussion_r1053868260


##########
submarine-server/server-core/src/main/java/org/apache/submarine/server/s3/Client.java:
##########
@@ -45,30 +47,57 @@
 /**
  * S3(Minio) default client
  */
-public class Client {
+public enum Client {
+  
DEFAULT(SubmarineConfiguration.getInstance().getString(SubmarineConfVars.ConfVars.SUBMARINE_S3_ENDPOINT)),

Review Comment:
   I don't think it's necessary to add an endpoint attribute to the enum, which 
can't declare a variable number of endpoints and has to use the internal map to 
handle it.
   ```java
   public enum Client {
     INSTANCE;
     public static Client getInstance(String endpoint) {
       // ....
     }
   }
   
   Client.INSTANCE.getInstance("http://localhost:9000";);
   ```



##########
submarine-server/server-core/src/main/java/org/apache/submarine/server/manager/ModelVersionManager.java:
##########
@@ -50,16 +50,14 @@ public class ModelVersionManager {
    *
    * @return object
    */
+  private static class ModelVersionManagerHolder {
+    private static ModelVersionManager manager = new 
ModelVersionManager(ModelVersionService.getInstance(),
+                                                                        new 
ModelVersionTagService(),

Review Comment:
   new class param should also be avoided here.



-- 
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]

Reply via email to