Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
xunliu committed Dec 19, 2024
1 parent c19292f commit 539c107
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public String shortName() {
}

@Override
protected AuthorizationPlugin newPlugin(
public AuthorizationPlugin newPlugin(
String metalake, String catalogProvider, Map<String, String> config) {
return new TestMySQLAuthorizationPlugin();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
package org.apache.gravitino.connector.authorization.ranger;

import com.google.common.base.Preconditions;
import java.util.Map;
import org.apache.gravitino.connector.authorization.AuthorizationPlugin;
import org.apache.gravitino.connector.authorization.BaseAuthorization;
Expand All @@ -29,23 +28,12 @@ public TestRangerAuthorization() {}

@Override
public String shortName() {
return "test-ranger";
return "ranger";
}

@Override
public AuthorizationPlugin newPlugin(
String metalake, String catalogProvider, Map<String, String> properties) {
Preconditions.checkArgument(
properties.containsKey("authorization.ranger.service.type"),
String.format("%s is required", "authorization.ranger.service.type"));
String serviceType = properties.get("authorization.ranger.service.type").toUpperCase();
switch (serviceType) {
case "HADOOPSQL":
return new TestRangerAuthorizationHadoopSQLPlugin();
case "HDFS":
return new TestRangerAuthorizationHDFSPlugin();
default:
throw new IllegalArgumentException("Unsupported service type: " + serviceType);
}
String metalake, String catalogProvider, Map<String, String> config) {
return new TestRangerAuthorizationPlugin();
}
}

0 comments on commit 539c107

Please sign in to comment.