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

java.lang.Object
  extended by org.apache.hadoop.hive.ql.hooks.Entity
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ReadEntity, WriteEntity

public class Entity
extends Object
implements Serializable

This class encapsulates an object that is being read or 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 Entity.Type
          The type of the entity.
 
Constructor Summary
Entity()
          Only used by serialization.
Entity(DummyPartition p, boolean complete)
           
Entity(Partition p)
          Constructor for a partition.
Entity(Partition p, boolean complete)
           
Entity(String d, boolean islocal)
          Constructor for a file.
Entity(String d, boolean islocal, boolean complete)
           
Entity(Table t)
          Constructor for a table.
Entity(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()
           
 Map<String,String> getParameters()
          Get the parameter map of the Entity.
 Partition getPartition()
          Get the partition associated with the entity.
 Table getT()
           
 Table getTable()
          Get the table associated with the entity.
 Entity.Type getTyp()
           
 Entity.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(Entity.Type typ)
           
 String toString()
          toString function.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Entity

public Entity()
Only used by serialization.


Entity

public Entity(Table t)
Constructor for a table.

Parameters:
t - Table that is read or written to.

Entity

public Entity(Table t,
              boolean complete)

Entity

public Entity(Partition p)
Constructor for a partition.

Parameters:
p - Partition that is read or written to.

Entity

public Entity(Partition p,
              boolean complete)

Entity

public Entity(DummyPartition p,
              boolean complete)

Entity

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

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

Entity

public Entity(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 Entity.Type getTyp()

setTyp

public void setTyp(Entity.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)

getParameters

public Map<String,String> getParameters()
Get the parameter map of the Entity.


getType

public Entity.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 © 2013 The Apache Software Foundation