org.apache.hadoop.hive.ql.hooks
Class WriteEntity

java.lang.Object
  extended by org.apache.hadoop.hive.ql.hooks.WriteEntity

public class WriteEntity
extends Object

This class encapsulates an object that is being written to by the query. This object may be a table, partition, dfs directory or a local directory.


Nested Class Summary
static class WriteEntity.Type
          The type of the write entity.
 
Constructor Summary
WriteEntity(Partition p)
          Constructor for a partition.
WriteEntity(String d, boolean islocal)
          Constructor for a file.
WriteEntity(Table t)
          Constructor for a table.
 
Method Summary
 boolean equals(Object o)
          Equals function.
 URI getLocation()
          Get the location of the entity.
 Partition getPartition()
          Get the partition associated with the entity.
 Table getTable()
          Get the table associated with the entity.
 WriteEntity.Type getType()
          Get the type of the entity.
 int hashCode()
          Hashcode function.
 String toString()
          toString function.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WriteEntity

public WriteEntity(Table t)
Constructor for a table.

Parameters:
t - Table that is written to.

WriteEntity

public WriteEntity(Partition p)
Constructor for a partition.

Parameters:
p - Partition that is written to.

WriteEntity

public WriteEntity(String d,
                   boolean islocal)
Constructor for a file.

Parameters:
d - The name of the directory that is being written to.
islocal - Flag to decide whether this directory is local or in dfs.
Method Detail

getType

public WriteEntity.Type getType()
Get the type of the entity.


getLocation

public URI getLocation()
                throws Exception
Get the location of the entity.

Throws:
Exception

getPartition

public Partition getPartition()
Get the partition associated with the entity.


getTable

public Table getTable()
Get the table associated with the entity.


toString

public String toString()
toString function.

Overrides:
toString in class Object

equals

public boolean equals(Object o)
Equals function.

Overrides:
equals in class Object

hashCode

public int hashCode()
Hashcode function.

Overrides:
hashCode in class Object


Copyright © 2009 The Apache Software Foundation