Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This class is a sub class of HCatCommandDesc and will be used by the users to create descriptos descriptors and validate it for the "create database" command.

...

Code Block
public class HCatAddPartitionDesc extends HCatCommandDesc {

    //private AddPartitionDesc addPartDesc;
    private String dbName;
    private String tableName;
    private String location;
    private LinkedHashMap<String,String> partSpec;

    /**
     * @return database name
     */
     String getDbName() {
         return this.dbName;
    }

    /**
     * Sets the db name.
     *
     * @param dbName database name
     */
    public void setDbName(String dbName) {
      this.dbName = dbName;
    }

    /**
     * @return the table we're going to add the partitions to.
     */
     String getTableName() {
      return this.tableName;
    }

    /**
     * Sets the table name.
     *
     * @param tableName the table we're going to add the partitions to.
     */
    public void setTableName(String tableName) {
      this.tableName = tableName;
    }

    String getLocation() {
      return this.location;
    }

    /**
     * Sets the location.
     *
     * @param location The location of partition in relation to table
     */
    public void setLocation(String location) {
      this.location = location;
    }

    /**
     * @return partition specification.
     */
     LinkedHashMap<String, String> getPartSpec() {
         return this.partSpec;
    }

    /**
     * Adds the partition name and value.
     *
     * @param colName The column name.
     * @param value The value.
     */
    public void addPartSpec(String colName, String value) {
      this.partSpec.put(colName, value);
    }

    @Override
    public void validateCommandDesc()
            throws HCatException {

    }

    /* @return
    /* @throws HCatException
     * @see org.apache.hcatalog.api.HCatCommandDesc#buildQuery()
     */
    @Override
    String buildQuery() throws HCatException {
        // TODO Auto-generated method stub
        return null;
    }

    /* @return
     * @see org.apache.hcatalog.api.HCatCommandDesc#isValidationComplete()
     */
    @Override
    boolean isValidationComplete() {
        // TODO Auto-generated method stub
        return false;
    }

}

...

Modification to Existing Classes:

...