sentryStore.alterSentryRoleGrantPrivilege(roleName1, privilege_tbl1_insert);
sentryStore.alterSentryRoleGrantPrivilege(roleName2, privilege_tbl1_select);
sentryStore.alterSentryRoleGrantPrivilege(roleName3, privilege_tbl1_all);
TSentryAuthorizable oldTable = toTSentryAuthorizable(privilege_tbl1);
TSentryAuthorizable newTable = toTSentryAuthorizable(privilege_tbl1);
newTable.setTable(table2);
sentryStore.renamePrivilege(oldTable, newTable, System.getProperty("user.name"));
for (String roleName : Sets.newHashSet(roleName1, roleName2, roleName3)) {
Set<TSentryPrivilege> privilegeSet = sentryStore
.getAllTSentryPrivilegesByRoleName(roleName);