org.apache.hadoop.zebra.types
Class Partition

java.lang.Object
  extended by org.apache.hadoop.zebra.types.Partition

public class Partition
extends Object

Partition is a column group management class. Its responsibilities include storing column groups, handle column groups spliting and stitching by insertions and queries respectively.


Nested Class Summary
 class Partition.PartitionInfo
           
static class Partition.SplitType
          Storage split types
 
Constructor Summary
Partition(Schema schema, Projection projection, String storage, String comparator)
           
Partition(String schema, String storage, String comparator)
           
Partition(String schema, String storage, String comparator, String sortColumns)
           
 
Method Summary
 CGSchema generateDefaultCGSchema(String name, String compressor, String serializer, String owner, String group, short perm, int defaultCGIndex, String comparator)
           
 CGSchema getCGSchema(int index)
           
 CGSchema[] getCGSchemas()
           
 String getComparator()
           
 Partition.PartitionInfo getPartitionInfo()
           
 Projection getProjection()
          returns table projection
 String getProjection(int cgindex)
          returns projection schema for a particular column group
 Schema getSchema()
          returns table schema
 SortInfo getSortInfo()
           
 HashSet<org.apache.hadoop.zebra.types.Partition.PartitionInfo.ColumnMappingEntry> getSplitMap(Schema.ColumnSchema fs)
           
 void insert(org.apache.hadoop.io.BytesWritable key, Tuple t)
          insert a tuple after splits
 boolean isCGNeeded(int i)
           
 boolean isSorted()
           
 void read(Tuple t)
          read in a tuple based on stitches
 boolean setCGIndex(Schema.ColumnSchema fs, int ri, int fi, String name)
           
 void setSource(Tuple[] tuples)
          sets the source tuple for the column group ops
 void setSplit(Schema.ColumnSchema fs, Partition.SplitType st, Partition.SplitType cst, String name, String childName, boolean splitChild)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Partition

public Partition(Schema schema,
                 Projection projection,
                 String storage,
                 String comparator)
          throws ParseException,
                 IOException
Throws:
ParseException
IOException

Partition

public Partition(String schema,
                 String storage,
                 String comparator,
                 String sortColumns)
          throws ParseException,
                 IOException
Throws:
ParseException
IOException

Partition

public Partition(String schema,
                 String storage,
                 String comparator)
          throws ParseException,
                 IOException
Throws:
ParseException
IOException
Method Detail

getSortInfo

public SortInfo getSortInfo()

isSorted

public boolean isSorted()

getComparator

public String getComparator()

getSchema

public Schema getSchema()
returns table schema


getPartitionInfo

public Partition.PartitionInfo getPartitionInfo()

getCGSchemas

public CGSchema[] getCGSchemas()

getCGSchema

public CGSchema getCGSchema(int index)

read

public void read(Tuple t)
          throws AssertionError,
                 IOException,
                 Exception
read in a tuple based on stitches

Throws:
AssertionError
IOException
Exception

insert

public void insert(org.apache.hadoop.io.BytesWritable key,
                   Tuple t)
            throws AssertionError,
                   IOException,
                   Exception
insert a tuple after splits

Throws:
AssertionError
IOException
Exception

setSource

public void setSource(Tuple[] tuples)
               throws ParseException
sets the source tuple for the column group ops

Throws:
ParseException

getProjection

public String getProjection(int cgindex)
                     throws ParseException
returns projection schema for a particular column group

Throws:
ParseException

getProjection

public Projection getProjection()
returns table projection


getSplitMap

public HashSet<org.apache.hadoop.zebra.types.Partition.PartitionInfo.ColumnMappingEntry> getSplitMap(Schema.ColumnSchema fs)

generateDefaultCGSchema

public CGSchema generateDefaultCGSchema(String name,
                                        String compressor,
                                        String serializer,
                                        String owner,
                                        String group,
                                        short perm,
                                        int defaultCGIndex,
                                        String comparator)
                                 throws ParseException
Throws:
ParseException

setSplit

public void setSplit(Schema.ColumnSchema fs,
                     Partition.SplitType st,
                     Partition.SplitType cst,
                     String name,
                     String childName,
                     boolean splitChild)
              throws ParseException
Throws:
ParseException

setCGIndex

public boolean setCGIndex(Schema.ColumnSchema fs,
                          int ri,
                          int fi,
                          String name)

isCGNeeded

public boolean isCGNeeded(int i)


Copyright © 2007-2012 The Apache Software Foundation