org.apache.hcatalog.mapreduce
Class OutputJobInfo

Object
  extended by OutputJobInfo
All Implemented Interfaces:
Serializable

public class OutputJobInfo
extends Object
implements Serializable

The class used to serialize and store the output related information

See Also:
Serialized Form

Method Summary
static OutputJobInfo create(String databaseName, String tableName, Map<String,String> partitionValues)
          Initializes a new OutputJobInfo instance for writing data from a table.
 String getDatabaseName()
           
 List<String> getDynamicPartitioningKeys()
           
 boolean getHarRequested()
          Returns whether or not hadoop archiving has been requested for this job
 String getLocation()
           
 int getMaxDynamicPartitions()
          Returns maximum number of allowable dynamic partitions
 HCatSchema getOutputSchema()
           
 Map<String,String> getPartitionValues()
          Gets the value of partitionValues
protected  List<Integer> getPosOfDynPartCols()
           
protected  List<Integer> getPosOfPartCols()
           
 Properties getProperties()
          Set/Get Property information to be passed down to *StorageHandler implementation put implementation specific storage handler configurations here
 HCatTableInfo getTableInfo()
           
 String getTableName()
           
 boolean isDynamicPartitioningUsed()
          Returns whether or not Dynamic Partitioning is used
 void setDynamicPartitioningKeys(List<String> dynamicPartitioningKeys)
          Sets the list of dynamic partitioning keys used for outputting without specifying all the keys
 void setHarRequested(boolean harRequested)
          Sets whether or not hadoop archiving has been requested for this job
 void setLocation(String location)
           
 void setMaximumDynamicPartitions(int maxDynamicPartitions)
          Set maximum number of allowable dynamic partitions
 void setOutputSchema(HCatSchema schema)
           
protected  void setPosOfDynPartCols(List<Integer> posOfDynPartCols)
           
protected  void setPosOfPartCols(List<Integer> posOfPartCols)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static OutputJobInfo create(String databaseName,
                                   String tableName,
                                   Map<String,String> partitionValues)
Initializes a new OutputJobInfo instance for writing data from a table.

Parameters:
databaseName - the db name
tableName - the table name
partitionValues - The partition values to publish to, can be null or empty Map to work with hadoop security, the kerberos principal name of the server - else null The principal name should be of the form: /_HOST@ like "hcat/_HOST@myrealm.com" The special string _HOST will be replaced automatically with the correct host name indicate write to a unpartitioned table. For partitioned tables, this map should contain keys for all partition columns with corresponding values.

getPosOfPartCols

protected List<Integer> getPosOfPartCols()
Returns:
the posOfPartCols

getPosOfDynPartCols

protected List<Integer> getPosOfDynPartCols()
Returns:
the posOfDynPartCols

setPosOfPartCols

protected void setPosOfPartCols(List<Integer> posOfPartCols)
Parameters:
posOfPartCols - the posOfPartCols to set

setPosOfDynPartCols

protected void setPosOfDynPartCols(List<Integer> posOfDynPartCols)
Parameters:
posOfDynPartCols - the posOfDynPartCols to set

getTableInfo

public HCatTableInfo getTableInfo()
Returns:
the tableInfo

getOutputSchema

public HCatSchema getOutputSchema()
Returns:
the outputSchema

setOutputSchema

public void setOutputSchema(HCatSchema schema)
Parameters:
schema - the outputSchema to set

getLocation

public String getLocation()
Returns:
the location

setLocation

public void setLocation(String location)
Parameters:
location - location to write to

getPartitionValues

public Map<String,String> getPartitionValues()
Gets the value of partitionValues

Returns:
the partitionValues

getDatabaseName

public String getDatabaseName()
Returns:
database name of table to write to

getTableName

public String getTableName()
Returns:
name of table to write to

getProperties

public Properties getProperties()
Set/Get Property information to be passed down to *StorageHandler implementation put implementation specific storage handler configurations here

Returns:
the implementation specific job properties

setMaximumDynamicPartitions

public void setMaximumDynamicPartitions(int maxDynamicPartitions)
Set maximum number of allowable dynamic partitions

Parameters:
maxDynamicPartitions -

getMaxDynamicPartitions

public int getMaxDynamicPartitions()
Returns maximum number of allowable dynamic partitions

Returns:
maximum number of allowable dynamic partitions

setHarRequested

public void setHarRequested(boolean harRequested)
Sets whether or not hadoop archiving has been requested for this job

Parameters:
harRequested -

getHarRequested

public boolean getHarRequested()
Returns whether or not hadoop archiving has been requested for this job

Returns:
whether or not hadoop archiving has been requested for this job

isDynamicPartitioningUsed

public boolean isDynamicPartitioningUsed()
Returns whether or not Dynamic Partitioning is used

Returns:
whether or not dynamic partitioning is currently enabled and used

setDynamicPartitioningKeys

public void setDynamicPartitioningKeys(List<String> dynamicPartitioningKeys)
Sets the list of dynamic partitioning keys used for outputting without specifying all the keys

Parameters:
dynamicPartitioningKeys -

getDynamicPartitioningKeys

public List<String> getDynamicPartitioningKeys()