public static HivePrivilegeObjectType getHivePrivilegeObjectType(Type type) {
    if (type == null){
      return null;
    }
    switch(type){
    case DATABASE:
      return HivePrivilegeObjectType.DATABASE;
    case TABLE:
      return HivePrivilegeObjectType.TABLE_OR_VIEW;
    case LOCAL_DIR:
      return HivePrivilegeObjectType.LOCAL_URI;
    case DFS_DIR:
      return HivePrivilegeObjectType.DFS_URI;
    case PARTITION:
    case DUMMYPARTITION: //need to determine if a different type is needed for dummy partitions
      return HivePrivilegeObjectType.PARTITION;
    case FUNCTION:
      return HivePrivilegeObjectType.FUNCTION;
    case SERVICE_NAME:
      return HivePrivilegeObjectType.SERVICE_NAME;
    case DATACONNECTOR:
      return HivePrivilegeObjectType.DATACONNECTOR;
    default:
      return null;
    }
  }
Convert thrift object type to hive authorization plugin object type
@param type - thrift object type
@return
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationUtils.java