com.splout.db.hadoop
Class TablespaceBuilder

java.lang.Object
  extended by com.splout.db.hadoop.TablespaceBuilder

public class TablespaceBuilder
extends java.lang.Object

This class is the main entry point for generating Splout views. Here we will use a Builder for adding the mapping between a set of files in a FileSystem and the tables that we want to view in a Tablespace in Splout.

We need to use TableBuilder for obtaining Table beans. Then we can add Tables to the Tablespace.

We will obtain a TablespaceSpec bean after building it.


Nested Class Summary
static class TablespaceBuilder.TablespaceBuilderException
          Exception that is thrown if a Tablespace cannot be built because there is missing data or inconsistent data has been specified.
 
Field Summary
static int ALL_PARTITIONS_AVAILABLE
           
 
Constructor Summary
TablespaceBuilder()
           
 
Method Summary
 TablespaceBuilder add(Table table)
          Add a new table to the builder - use a string table identifier for this.
 TablespaceSpec build()
          After specifying everything, call this method for building the final tablespace spec.
 void initStatements(java.lang.String... initStatements)
           
 void setNPartitions(int nPartitions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_PARTITIONS_AVAILABLE

public static final int ALL_PARTITIONS_AVAILABLE
See Also:
Constant Field Values
Constructor Detail

TablespaceBuilder

public TablespaceBuilder()
Method Detail

add

public TablespaceBuilder add(Table table)
                      throws TablespaceBuilder.TablespaceBuilderException
Add a new table to the builder - use a string table identifier for this. The method will return a bean that we can use for filling the information of the table.

Throws:
TablespaceBuilder.TablespaceBuilderException

initStatements

public void initStatements(java.lang.String... initStatements)

setNPartitions

public void setNPartitions(int nPartitions)

build

public TablespaceSpec build()
                     throws TablespaceBuilder.TablespaceBuilderException
After specifying everything, call this method for building the final tablespace spec.

Throws:
TablespaceBuilder.TablespaceBuilderException


Copyright © 2012-2013 Datasalt Systems S.L.. All Rights Reserved.