@Override
public boolean grant_role(String roleName, String userName,
PrincipalType principalType, String grantor, PrincipalType grantorType,
boolean grantOption) throws MetaException, TException {
GrantRevokeRoleRequest req = new GrantRevokeRoleRequest();
req.setRequestType(GrantRevokeType.GRANT);
req.setRoleName(roleName);
req.setPrincipalName(userName);
req.setPrincipalType(principalType);
req.setGrantor(grantor);
req.setGrantorType(grantorType);
req.setGrantOption(grantOption);
GrantRevokeRoleResponse res = client.grant_revoke_role(req);
if (!res.isSetSuccess()) {
throw new MetaException("GrantRevokeResponse missing success field");
}
return res.isSuccess();