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(org.apache.hadoop.hive.metastore.api.Database database, boolean complete)
          Constructor for a database.
Entity(DummyPartition p, boolean complete)
           
Entity(Partition p, boolean complete)
          Constructor for a partition.
Entity(String d, boolean islocal, boolean complete)
           
Entity(Table t, boolean complete)
          Constructor for a table.
 
Method Summary
 boolean equals(Object o)
          Equals function.
 String getD()
           
 org.apache.hadoop.hive.metastore.api.Database getDatabase()
           
 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()
           
 boolean isDummy()
           
 void setComplete(boolean complete)
           
 void setD(String d)
           
 void setDatabase(org.apache.hadoop.hive.metastore.api.Database database)
           
 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
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Entity

public Entity()
Only used by serialization.


Entity

public Entity(org.apache.hadoop.hive.metastore.api.Database database,
              boolean complete)
Constructor for a database.

Parameters:
database - Database that is read or written to.
complete - Means the database is target, not for table or partition, etc.

Entity

public Entity(Table t,
              boolean complete)
Constructor for a table.

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

Entity

public Entity(Partition p,
              boolean complete)
Constructor for a partition.

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

Entity

public Entity(DummyPartition p,
              boolean complete)

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)

getDatabase

public org.apache.hadoop.hive.metastore.api.Database getDatabase()

setDatabase

public void setDatabase(org.apache.hadoop.hive.metastore.api.Database database)

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.


isDummy

public boolean isDummy()

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 © 2014 The Apache Software Foundation. All rights reserved.