try {
String requestorUserName = UserGroupInformation.getCurrentUser()
.getShortUserName();
SentryPolicyServiceClient sentryClient = getSentryServiceClient();
sentryClient.renamePrivileges(requestorUserName, oldAuthorizableTable, newAuthorizableTable);
} catch (SentryUserException e) {
throw new MetaException(
"Failed to remove Sentry policies for rename table " + oldDbName
+ "." + oldTabName + "to " + newDbName + "." + newTabName
+ " Error: " + e.getMessage());