public PrivilegeGrantInfo build() throws MetaException {
    if (privilege == null) {
      throw new MetaException("Privilege must be provided.");
    }
    if (grantor == null) {
      try {
        grantor = SecurityUtils.getUser();
        grantorType = PrincipalType.USER;
      } catch (IOException e) {
        throw MetaStoreUtils.newMetaException(e);
      }
    }
    return new PrivilegeGrantInfo(privilege, createTime, grantor, grantorType, grantOption);
  }
Builder for {@link PrivilegeGrantInfo}.  The privilege is required.  If not provided the grantor
is
assumed to be the current user.  This is really intended for use by the
{@link HiveObjectPrivilegeBuilder}.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/client/builder/PrivilegeGrantInfoBuilder.java