sv2000 commented on a change in pull request #2613: [GOBBLIN-748]Craftsmanship
code cleaning in Gobblin Service Code
URL: https://github.com/apache/incubator-gobblin/pull/2613#discussion_r277524820
##########
File path:
gobblin-service/src/main/java/org/apache/gobblin/service/modules/template_catalog/FSFlowTemplateCatalog.java
##########
@@ -125,13 +123,7 @@ public FlowTemplate getFlowTemplate(URI
flowTemplateDirURI)
return false;
};
- if
(!this.sysConfig.hasPath(ServiceConfigKeys.TEMPLATE_CATALOGS_FULLY_QUALIFIED_PATH_KEY))
{
- throw new RuntimeException("Missing config " +
ServiceConfigKeys.TEMPLATE_CATALOGS_FULLY_QUALIFIED_PATH_KEY);
- }
- if (!flowTemplateDirURI.getScheme().equals(FS_SCHEME)) {
- throw new RuntimeException(
- "Expected scheme " + FS_SCHEME + " got unsupported scheme " +
flowTemplateDirURI.getScheme());
- }
+ validateTemplateURI(flowTemplateDirURI);
Review comment:
Throw an exception if flowTemplateDirUri is invalid. Change it to if
(!isValidTemplateURI()) {...}.
----------------------------------------------------------------
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