xunliu commented on code in PR #4651:
URL: https://github.com/apache/gravitino/pull/4651#discussion_r1730635893
##########
core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java:
##########
@@ -802,25 +812,60 @@ private String buildConfPath(Map<String, String>
properties, String provider) {
return confPath;
}
- private String buildPkgPath(Map<String, String> conf, String provider) {
+ private String buildPkgPath(
+ Map<String, String> conf, String provider,
IsolatedClassLoader.IsolatedType isolatedType) {
String gravitinoHome = System.getenv("GRAVITINO_HOME");
Preconditions.checkArgument(gravitinoHome != null, "GRAVITINO_HOME not
set");
boolean testEnv = System.getenv("GRAVITINO_TEST") != null;
String pkg = conf.get(Catalog.PROPERTY_PACKAGE);
- String pkgPath;
if (pkg != null) {
- pkgPath = String.join(File.separator, pkg, "libs");
- } else if (testEnv) {
- // In test, the catalog package is under the build directory.
- pkgPath =
- String.join(
- File.separator, gravitinoHome, "catalogs", "catalog-" +
provider, "build", "libs");
- } else {
- // In real environment, the catalog package is under the catalog
directory.
- pkgPath = String.join(File.separator, gravitinoHome, "catalogs",
provider, "libs");
+ return String.join(File.separator, pkg, "libs");
Review Comment:
I refactor these codes.
--
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]