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

java.lang.Object
  extended by org.apache.hadoop.hive.ql.hooks.WriteEntity
All Implemented Interfaces:
Serializable

public class WriteEntity
extends Object
implements Serializable

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.

See Also:
Serialized Form

Nested Class Summary
static class WriteEntity.Type
          The type of the write entity.
 
Constructor Summary
WriteEntity()
          Only used by serialization.
WriteEntity(DummyPartition p, boolean complete)
           
WriteEntity(Partition p)
          Constructor for a partition.
WriteEntity(Partition p, boolean complete)
           
WriteEntity(String d, boolean islocal)
          Constructor for a file.
WriteEntity(String d, boolean islocal, boolean complete)
           
WriteEntity(Table t)
          Constructor for a table.
WriteEntity(Table t, boolean complete)
           
 
Method Summary
 boolean equals(Object o)
          Equals function.
 String getD()
           
 URI getLocation()
          Get the location of the entity.
 String getName()
           
 Partition getP()
           
 Partition getPartition()
          Get the partition associated with the entity.
 Table getT()
           
 Table getTable()
          Get the table associated with the entity.
 WriteEntity.Type getTyp()
           
 WriteEntity.Type getType()
          Get the type of the entity.
 int hashCode()
          Hashcode function.
 boolean isComplete()
           
 void setComplete(boolean complete)
           
 void setD(String d)
           
 void setName(String name)
           
 void setP(Partition p)
           
 void setT(Table t)
           
 void setTyp(WriteEntity.Type typ)
           
 String toString()
          toString function.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WriteEntity

public WriteEntity()
Only used by serialization.


WriteEntity

public WriteEntity(Table t)
Constructor for a table.

Parameters:
t - Table that is written to.

WriteEntity

public WriteEntity(Table t,
                   boolean complete)

WriteEntity

public WriteEntity(Partition p)
Constructor for a partition.

Parameters:
p - Partition that is written to.

WriteEntity

public WriteEntity(Partition p,
                   boolean complete)

WriteEntity

public WriteEntity(DummyPartition p,
                   boolean complete)

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.

WriteEntity

public WriteEntity(String d,
                   boolean islocal,
                   boolean complete)
Method Detail

isComplete

public boolean isComplete()

setComplete

public void setComplete(boolean complete)

getName

public String getName()

setName

public void setName(String name)

getTyp

public WriteEntity.Type getTyp()

setTyp

public void setTyp(WriteEntity.Type typ)

getT

public Table getT()

setT

public void setT(Table t)

getP

public Partition getP()

setP

public void setP(Partition p)

getD

public String getD()

setD

public void setD(String d)

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 © 2011 The Apache Software Foundation