@Override
  public Partition append_partition_req(final AppendPartitionsRequest appendPartitionsReq)
      throws InvalidObjectException, AlreadyExistsException, MetaException {
    List<String> part_vals = appendPartitionsReq.getPartVals();
    String dbName = appendPartitionsReq.getDbName();
    String catName = appendPartitionsReq.isSetCatalogName() ?
        appendPartitionsReq.getCatalogName() : getDefaultCatalog(conf);
    String tableName = appendPartitionsReq.getTableName();
    String partName = appendPartitionsReq.getName();
    if (partName == null && (part_vals == null || part_vals.isEmpty())) {
      throw new MetaException("The partition values must not be null or empty.");
    }
    if (part_vals == null || part_vals.isEmpty()) {
      // partition name is set, get partition vals and then append partition
      part_vals = getPartValsFromName(getMS(), catName, dbName, tableName, partName);
    }
    startPartitionFunction("append_partition_req", catName, dbName, tableName, part_vals);
    if (LOG.isDebugEnabled()) {
      for (String part : part_vals) {
        LOG.debug(part);
      }
    }
    Partition ret = null;
    Exception ex = null;
    try {
      ret = append_partition_common(getMS(), catName, dbName, tableName, part_vals, appendPartitionsReq.getEnvironmentContext());
    } catch (Exception e) {
      ex = e;
      throw handleException(e)
          .throwIfInstance(MetaException.class, InvalidObjectException.class, AlreadyExistsException.class)
          .defaultMetaException();
    } finally {
      endFunction("append_partition_req", ret != null, ex, tableName);
    }
    return ret;
  }
Gets multiple tables from the hive metastore.

@param req
         The GetTablesRequest object.
@return A list of tables whose names are in the the list "names" and
        are retrievable from the database specified by "dbnames."
        There is no guarantee of the order of the returned tables.
        If there are duplicate names, only one instance of the table will be returned.
@throws MetaException
@throws InvalidOperationException
@throws UnknownDBException
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java