yuanzac commented on a change in pull request #92: SUBMARINE-276. Submarine 
runtime class config should be defined in the new configuration class.
URL: https://github.com/apache/submarine/pull/92#discussion_r346218669
 
 

 ##########
 File path: 
submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/FileSystemOperations.java
 ##########
 @@ -179,9 +179,9 @@ public void validFileSize(String uri) throws IOException {
     } else {
       actualSizeByte = FileUtil.getDU(new File(uri));
     }
-    long maxFileSizeMB = submarineConfig
-        .getLong(SubmarineConfiguration.LOCALIZATION_MAX_ALLOWED_FILE_SIZE_MB,
-            SubmarineConfiguration.DEFAULT_MAX_ALLOWED_REMOTE_URI_SIZE_MB);
+    long maxFileSizeMB = submarineConfig.getLong(
+        SubmarineConfiguration.ConfVars.
+            SUBMARINE_LOCALIZATION_MAX_ALLOWED_FILE_SIZE_MB);
 
 Review comment:
   Yeah, add a method in SubmarineConfiguration:
   ```
   public long getLong(ConfVars c) {
       return getLong(c.name(), c.getVarName(), c.getLongValue());
     }
   ```
   This method will return the default value if the value is empty.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to