You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[#6530] improvement(authorization): Reduce repeated strings in Ranger classes (#6685)
### What changes were proposed in this pull request?
Reduce repeated strings in Ranger classes, abstract the error message
and make them static.
### Why are the changes needed?
Fix: #6530
### Does this PR introduce _any_ user-facing change?
no.
### How was this patch tested?
local test.
Copy file name to clipboardexpand all lines: authorizations/authorization-common/src/main/java/org/apache/gravitino/authorization/common/ChainedAuthorizationProperties.java
+2-2
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ public Map<String, String> fetchAuthPluginProperties(String pluginName) {
Copy file name to clipboardexpand all lines: authorizations/authorization-common/src/main/java/org/apache/gravitino/authorization/common/RangerAuthorizationProperties.java
+14-10
Original file line number
Diff line number
Diff line change
@@ -82,30 +82,34 @@ public String getPropertiesPrefix() {
82
82
publicvoidvalidate() {
83
83
Preconditions.checkArgument(
84
84
properties.containsKey(RANGER_ADMIN_URL),
85
-
String.format("%s is required", RANGER_ADMIN_URL));
Copy file name to clipboardexpand all lines: authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerAuthorization.java
Copy file name to clipboardexpand all lines: authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerAuthorizationHDFSPlugin.java
Copy file name to clipboardexpand all lines: authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerAuthorizationHadoopSQLPlugin.java
Copy file name to clipboardexpand all lines: authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerAuthorizationPlugin.java
0 commit comments