org.apache.hadoop.hive.ql.plan
Class AddPartitionDesc

java.lang.Object
  extended by org.apache.hadoop.hive.ql.plan.DDLDesc
      extended by org.apache.hadoop.hive.ql.plan.AddPartitionDesc
All Implemented Interfaces:
Serializable

public class AddPartitionDesc
extends DDLDesc
implements Serializable

Contains the information needed to add one or more partitions.

See Also:
Serialized Form

Nested Class Summary
static class AddPartitionDesc.OnePartitionDesc
           
 
Constructor Summary
AddPartitionDesc()
          For serialization only.
AddPartitionDesc(String dbName, String tableName, boolean ifNotExists)
           
AddPartitionDesc(String dbName, String tableName, Map<String,String> partSpec, String location, Map<String,String> params)
          Deprecated. 
 
Method Summary
 void addPartition(Map<String,String> partSpec, String location)
           
 String getDbName()
           
 String getLocationForExplain()
           
 AddPartitionDesc.OnePartitionDesc getPartition(int i)
           
 int getPartitionCount()
           
 String getPartSpecStringForExplain()
           
 String getTableName()
           
 boolean isIfNotExists()
           
 void setDbName(String dbName)
           
 void setIfNotExists(boolean ifNotExists)
           
 void setTableName(String tableName)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddPartitionDesc

public AddPartitionDesc()
For serialization only.


AddPartitionDesc

public AddPartitionDesc(String dbName,
                        String tableName,
                        boolean ifNotExists)

AddPartitionDesc

@Deprecated
public AddPartitionDesc(String dbName,
                                   String tableName,
                                   Map<String,String> partSpec,
                                   String location,
                                   Map<String,String> params)
Deprecated. 

Legacy single-partition ctor for ImportSemanticAnalyzer

Parameters:
dbName - database to add to.
tableName - table to add to.
partSpec - partition specification.
location - partition location, relative to table location.
params - partition parameters.
Method Detail

addPartition

public void addPartition(Map<String,String> partSpec,
                         String location)

getDbName

public String getDbName()
Returns:
database name

setDbName

public void setDbName(String dbName)
Parameters:
dbName - database name

getTableName

public String getTableName()
Returns:
the table we're going to add the partitions to.

setTableName

public void setTableName(String tableName)
Parameters:
tableName - the table we're going to add the partitions to.

getLocationForExplain

public String getLocationForExplain()
Returns:
location of partition in relation to table

getPartSpecStringForExplain

public String getPartSpecStringForExplain()

isIfNotExists

public boolean isIfNotExists()
Returns:
if the partition should only be added if it doesn't exist already

setIfNotExists

public void setIfNotExists(boolean ifNotExists)
Parameters:
ifNotExists - if the part should be added only if it doesn't exist

getPartitionCount

public int getPartitionCount()

getPartition

public AddPartitionDesc.OnePartitionDesc getPartition(int i)


Copyright © 2014 The Apache Software Foundation. All rights reserved.