[
https://issues.apache.org/jira/browse/SENTRY-1543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16250736#comment-16250736
]
Hadoop QA commented on SENTRY-1543:
-----------------------------------
Here are the results of testing the latest attachment
https://issues.apache.org/jira/secure/attachment/12897397/SENTRY-1543.001.patch
against master.
{color:red}Overall:{color} -1 due to 99 errors
{color:red}ERROR:{color} mvn test exited 1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtTableScopePart2
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestColumnEndToEnd
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestColumnEndToEnd
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestColumnEndToEnd
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestColumnEndToEnd
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestOperationsPart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestOperationsPart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPerDBConfiguration
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPerDBConfiguration
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPerDBConfiguration
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbExportImportPrivileges
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbExportImportPrivileges
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hdfs.TestHDFSIntegrationAdvanced
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbComplexView
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbComplexView
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbComplexView
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtDatabaseScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtDatabaseScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestOperationsPart2
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestOperationsPart2
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtTableScopePart2
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtTableScopePart2
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestViewPrivileges
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbEndToEnd
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbEndToEnd
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtTableScopePart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtTableScopePart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtTableScopePart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtTableScopePart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtTableScopePart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestMovingToProduction
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestMovingToProduction
{color:red}ERROR:{color} Failed: org.apache.sentry.tests.e2e.hive.TestCrossDbOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegeAtTransform
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtColumnScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtColumnScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtColumnScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbOperationsPart2
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbOperationsPart2
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbOperationsPart2
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestPrivilegeWithGrantOption
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestPrivilegeWithGrantOption
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbCrossDbOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbCrossDbOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtTableScopePart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtTableScopePart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtTableScopePart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtTableScopePart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtTableScopePart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtTableScopePart1
{color:red}ERROR:{color} Failed: org.apache.sentry.tests.e2e.hive.TestSandboxOps
{color:red}ERROR:{color} Failed: org.apache.sentry.tests.e2e.hive.TestSandboxOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbOperationsPart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbOperationsPart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbOperationsPart1
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbCrossOperations
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbCrossOperations
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbCrossOperations
{color:red}ERROR:{color} Failed: org.apache.sentry.tests.e2e.hive.TestEndToEnd
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestExportImportPrivileges
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtColumnScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.hive.TestPrivilegesAtColumnScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbMovingToProduction
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbMovingToProduction
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbMovingToProduction
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtDatabaseScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtDatabaseScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtDatabaseScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegesAtFunctionScope
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.metastore.TestMetastoreEndToEnd
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.metastore.TestMetastoreEndToEnd
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.metastore.TestMetastoreEndToEnd
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbSandboxOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbSandboxOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbSandboxOps
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegeAtTransform
{color:red}ERROR:{color} Failed:
org.apache.sentry.tests.e2e.dbprovider.TestDbPrivilegeAtTransform
Console output:
https://builds.apache.org/job/PreCommit-SENTRY-Build/3436/console
This message is automatically generated.
> dropOrRenamePrivilegeForAllRoles() has confusing code
> -----------------------------------------------------
>
> Key: SENTRY-1543
> URL: https://issues.apache.org/jira/browse/SENTRY-1543
> Project: Sentry
> Issue Type: Improvement
> Components: Sentry
> Affects Versions: 1.8.0
> Reporter: Alexander Kolbasov
> Assignee: Steve Moist
> Priority: Minor
> Labels: bite-sized, newbie
> Attachments: SENTRY-1543.001.patch
>
>
> {code}
> private void dropOrRenamePrivilegeForAllRoles(PersistenceManager pm,
> TSentryPrivilege tPrivilege,
> TSentryPrivilege newTPrivilege) throws SentryNoSuchObjectException,
> SentryInvalidInputException {
> HashSet<MSentryRole> roleSet = Sets.newHashSet();
> List<MSentryPrivilege> mPrivileges = getMSentryPrivileges(tPrivilege, pm);
> if (mPrivileges != null && !mPrivileges.isEmpty()) {
> for (MSentryPrivilege mPrivilege : mPrivileges) {
> roleSet.addAll(ImmutableSet.copyOf(mPrivilege.getRoles()));
> }
> }
> MSentryPrivilege parent = getMSentryPrivilege(tPrivilege, pm);
> ...
> }
> {code}
> Note that first we do getMSentryPrivileges(tPrivilege) and then
> getMSentryPrivilege(tPrivilege). In the first case the list of multiple
> entries is returned, in the second only a single element is returned.
> The two calls construct query a bit differently - the getMSentryPrivilege()
> unconditionally adds filters for all components.
> So the intent here is rather confusing and it would be good to clarify in the
> comments.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)