jerryshao commented on code in PR #9008:
URL: https://github.com/apache/gravitino/pull/9008#discussion_r2488408248
##########
integration-test-common/src/test/java/org/apache/gravitino/integration/test/MiniGravitino.java:
##########
@@ -78,11 +84,25 @@ public MiniGravitino(MiniGravitinoContext context) throws
IOException {
mockConfDir.mkdirs();
}
- private void removeAuxRestConfiguration(Properties properties) {
- // Disable Iceberg REST service
- properties.remove(
- AuxiliaryServiceManager.GRAVITINO_AUX_SERVICE_PREFIX
- + AuxiliaryServiceManager.AUX_SERVICE_NAMES);
+ private void removeAuxRestConfiguration(Properties properties, String
serviceToRemove) {
+ String value =
+ properties.getProperty(
+ AuxiliaryServiceManager.GRAVITINO_AUX_SERVICE_PREFIX
+ + AuxiliaryServiceManager.AUX_SERVICE_NAMES);
+ if (value != null && !value.isEmpty()) {
+ List<String> serviceNames = COMMA.splitToList(value);
+ List<String> updatedServiceNames = new ArrayList<>();
+ for (String serviceName : serviceNames) {
+ if (!serviceName.equalsIgnoreCase(serviceToRemove)) {
+ updatedServiceNames.add(serviceName);
+ }
+ }
+ String updatedValue = String.join(",", updatedServiceNames);
Review Comment:
If the `updatedServiceNames` is empty, shall we remove the config?
--
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]