When objects are created and owner privilege is enabled in sentry, we should create an owner privilege in the catalog without waiting for the next sentry poll to get the owner privilege. This should also be done for DROP DB/Table, and ALTER DB/Table set owner. These privileges should mirror the privileges that are created in Sentry. As with other GRANT operations, the results of the "SHOW GRANT ROLE" statements will have a create date of NULL for privileges that have not been refreshed from Sentry.
For this Jira, we're adding code to the various catalog operations to create or remove privileges as necessary. Because catalogd does not have the server_name set, we opted to pass the server_name as part of the catalog operations so the catalog is able to create the privileges.
Additionally, because we want to ensure consistency with the sentry, we grab the SentryOwnerPrivilegeType from sentry instead of reading from the local config file.
This change requires a new series of tests that will execute both with and without data refreshed from Sentry privilege database.