org.apache.hadoop.hive.metastore
Class RWTable

java.lang.Object
  extended by org.apache.hadoop.hive.metastore.ROTable
      extended by org.apache.hadoop.hive.metastore.RWTable
Direct Known Subclasses:
Table

public class RWTable
extends ROTable


Field Summary
protected  boolean o_rdonly_
           
 
Fields inherited from class org.apache.hadoop.hive.metastore.ROTable
conf_, LOG, parent_, schema_, store_, tableName_, whPath_
 
Constructor Summary
protected RWTable()
           
protected RWTable(DB parent, String tableName, org.apache.hadoop.conf.Configuration conf, boolean o_rdonly)
           
 
Method Summary
 void alter(Properties schema)
          alter Add column names to a column set ser de table.
static Table create(DB parent, String tableName, Properties schema, org.apache.hadoop.conf.Configuration conf)
          create
 void createPartition(String name)
           
 void drop()
          drop delete the schema for this table and optionally delete the data.
 void drop(boolean deleteData)
          drop delete the schema for this table and optionally delete the data.
protected  void save(boolean overwrite)
          save Save the schema.
 void truncate()
          truncate delete the data, but not the schema Can be applied on a partition by partition basis
 void truncate(String partition)
           
 
Methods inherited from class org.apache.hadoop.hive.metastore.ROTable
equals, getPartitions, getPath, getSchema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

o_rdonly_

protected boolean o_rdonly_
Constructor Detail

RWTable

protected RWTable()

RWTable

protected RWTable(DB parent,
                  String tableName,
                  org.apache.hadoop.conf.Configuration conf,
                  boolean o_rdonly)
           throws UnknownTableException,
                  MetaException
Throws:
UnknownTableException
MetaException
Method Detail

createPartition

public void createPartition(String name)
                     throws IOException
Throws:
IOException

drop

public void drop(boolean deleteData)
          throws MetaException
drop delete the schema for this table and optionally delete the data. Note the data is actually moved to the Trash, not really deleted.

Parameters:
deleteData - should we delete the underlying data or just the schema?
Throws:
MetaException - if any problems instantiating this object

drop

public void drop()
          throws MetaException
drop delete the schema for this table and optionally delete the data. Note the data is actually moved to the Trash, not really deleted.

Throws:
MetaException - if any problems instantiating this object

truncate

public void truncate()
              throws MetaException
truncate delete the data, but not the schema Can be applied on a partition by partition basis

Throws:
MetaException - if any problems instantiating this object

truncate

public void truncate(String partition)
              throws MetaException
Throws:
MetaException

alter

public void alter(Properties schema)
           throws MetaException
alter Add column names to a column set ser de table.

Parameters:
schema - the property value pairs for the table
Throws:
MetaException - if any problems altering the table

create

public static Table create(DB parent,
                           String tableName,
                           Properties schema,
                           org.apache.hadoop.conf.Configuration conf)
                    throws MetaException
create

Throws:
MetaException - if any problems encountered during the creation

save

protected void save(boolean overwrite)
             throws MetaException
save Save the schema. Note this will save the schema in the format of its choice, potentially doing some rewrites from this code's version to a previous version for backwards compatability.

Parameters:
overwrite - - should this be a create or an alter basically
Throws:
MetaException - if any problems saving the schema


Copyright © 2009 The Apache Software Foundation