Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#4759] feat(auth-ranger): Use Spark verify Ranger authorization Hive #4948

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

xunliu
Copy link
Member

@xunliu xunliu commented Sep 16, 2024

What changes were proposed in this pull request?

  1. Shadow integration-test-common module.
  2. Add Ranger authorization Hive IT, use Spark to verify Ranger authorization Hive.

Why are the changes needed?

Fix: #4759

Does this PR introduce any user-facing change?

N/A

How was this patch tested?

CI Passed.

@xunliu xunliu self-assigned this Sep 16, 2024
@xunliu xunliu force-pushed the issue-4759 branch 11 times, most recently from bb0092c to d399416 Compare September 16, 2024 11:30
@xunliu xunliu force-pushed the issue-4759 branch 11 times, most recently from 72789d7 to dba750d Compare September 18, 2024 15:20
@xunliu xunliu changed the title [#4759] feat(CI): Use Spark verify Ranger authorization Hive [#4759] feat(auth-ranger): Use Spark verify Ranger authorization Hive Sep 18, 2024
@xunliu xunliu force-pushed the issue-4759 branch 4 times, most recently from dc5a9e9 to ee98f63 Compare September 19, 2024 13:39
Copy link
Member Author

@xunliu xunliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FANNG1 Thank you for your help me to fix log4j issue.

Please help me review this PR, thanks.


testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
val testShadowJar by tasks.registering(ShadowJar::class) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after using ShadowJar, the integration test common jar will include almost all dependences, is it expected?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The integration-test-comman ShadowJar main use to running MiniGravitino service.
We can expend a single MiniGravitino module in the Gravitino project in the future.
@mchades What do you think?

@@ -260,6 +260,29 @@ private void initializeWebAppServletContextHandler() {
servletContextHandler = new WebAppContext();

boolean isUnitTest = System.getenv("GRAVITINO_TEST") != null;
if (isUnitTest) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about this change, you relocate the jetty package not exclude it, why couldn't find the jetty class?

@@ -299,7 +322,7 @@ private void initializeWebAppServletContextHandler() {
if (warFile.isDirectory()) {
// Development mode, read from FS
servletContextHandler.setResourceBase(warFile.getPath());
servletContextHandler.setContextPath("/");
servletContextHandler.addServlet(DefaultServlet.class, "/");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason changing this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use a web.xml to initial the servletContextHandler. So need change this line.

testImplementation(project(":server"))
testImplementation(project(":server-common"))
testImplementation(project(":core")) {
exclude(group = "org.rocksdb", module = "rocksdbjni")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason exclude rocksdb? since this is used for test only.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rocksdb-xxx.jar have 47MB size, let Shadow jar package very big, and currently we doesn't support rocksdb storage. So I exclude it.

@@ -73,7 +73,7 @@ public static void setUp() throws Exception {

mySQLCatalog =
new TestCatalog()
.withCatalogConf(ImmutableMap.of(Catalog.AUTHORIZATION_PROVIDER, "mysql"))
.withCatalogConf(ImmutableMap.of(Catalog.AUTHORIZATION_PROVIDER, "mysqlTest"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use a static variable? since it's shared by different classes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not other place needs to use this static variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Subtask] Use Spark verify Ranger authorization Hive
2 participants