Skip to content

Conversation

@aasha
Copy link
Contributor

@aasha aasha commented May 12, 2020

No description provided.

@aasha aasha force-pushed the HIVE-23433 branch 3 times, most recently from 2340c4f to 9513679 Compare May 15, 2020 12:22
Mockito.when(conf.getVar(REPL_RANGER_SERVICE_NAME)).thenReturn("hive");
Path rangerDumpPath = new Path("/tmp");
Mockito.when(work.getCurrentDumpPath()).thenReturn(rangerDumpPath);
mockClient.saveRangerPoliciesToFile(rangerPolicyList,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this line needed? you anyway returning policyList on readRangerPoliciesFromJsonFile call: 178

denyExceptionsPolicyItem.setAccesses(denyExceptionsPolicyItemAccesses);
denyExceptionsItemsForBeaconUser.add(denyExceptionsPolicyItem);
List<String> denyExceptionsPolicyItemsUsers = new ArrayList<String>();
denyExceptionsPolicyItemsUsers.add("hive");
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be hive service user and obtained from conf?

denyRangerPolicy.setResources(rangerPolicyResourceMap);

List<String> accessTypes = new ArrayList<>();
accessTypes.addAll(Arrays.asList("create", "update", "drop", "alter", "index", "lock", "write", "ReplAdmin"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't need to do addAll. You can directly use List accessTypes = Arrays.asList

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.

@github-actions github-actions bot added the stale label Jul 19, 2020
@github-actions github-actions bot closed this Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants