org.apache.hadoop.zebra.io
Class BasicTable

java.lang.Object
  extended by org.apache.hadoop.zebra.io.BasicTable

public class BasicTable
extends Object

A materialized table that consists of one or more tightly coupled Column Groups. The following Configuration parameters can customize the behavior of BasicTable.


Nested Class Summary
static class BasicTable.Reader
          BasicTable reader.
static class BasicTable.Writer
          BasicTable writer.
 
Field Summary
static String DELETED_CG_SEPARATOR_PER_TABLE
           
 
Method Summary
static void drop(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
          Drop a Basic Table, all files consisting of the BasicTable will be removed.
static void dropColumnGroup(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf, String cgName)
          Deletes the data for column group specified by cgName.
static void dumpInfo(String file, PrintStream out, org.apache.hadoop.conf.Configuration conf)
           
static void dumpInfo(String file, PrintStream out, org.apache.hadoop.conf.Configuration conf, int indent)
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELETED_CG_SEPARATOR_PER_TABLE

public static final String DELETED_CG_SEPARATOR_PER_TABLE
See Also:
Constant Field Values
Method Detail

dropColumnGroup

public static void dropColumnGroup(org.apache.hadoop.fs.Path path,
                                   org.apache.hadoop.conf.Configuration conf,
                                   String cgName)
                            throws IOException
Deletes the data for column group specified by cgName. When the readers try to read the fields that were stored in the column group get null since the underlying data is removed.

Effect on the readers that are currently reading from the table while a column group is droped is unspecified. Suggested practice is to drop column groups when there are no readers or writes for the table.

Column group names are usually specified in the "storage hint" while creating a table. If no name is specified, system assigns a simple name. These names could be obtained through "dumpInfo()" and other methods.

Dropping a column group that has already been removed is a no-op no exception is thrown.

Note that this feature is experimental now and subject to changes in the future.

Parameters:
path - path to BasicTable
conf - Configuration determines file system and other parameters.
cgName - name of the column group to drop.
Throws:
IOException - IOException could occur for various reasons. E.g. a user does not have permissions to write to table directory.

drop

public static void drop(org.apache.hadoop.fs.Path path,
                        org.apache.hadoop.conf.Configuration conf)
                 throws IOException
Drop a Basic Table, all files consisting of the BasicTable will be removed.

Parameters:
path - the path to the Basic Table.
conf - The configuration object.
Throws:
IOException

dumpInfo

public static void dumpInfo(String file,
                            PrintStream out,
                            org.apache.hadoop.conf.Configuration conf)
                     throws IOException
Throws:
IOException

dumpInfo

public static void dumpInfo(String file,
                            PrintStream out,
                            org.apache.hadoop.conf.Configuration conf,
                            int indent)
                     throws IOException
Throws:
IOException

main

public static void main(String[] args)


Copyright © 2007-2012 The Apache Software Foundation