|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.splout.db.hadoop.TableSpec
public class TableSpec
Simple immutable bean that specifies the Pangool Schema of a Splout Table and the Fields that need to be indexed and how it is partitioned.
It is part of a Table
bean. It is also used by TupleSQLite4JavaOutputFormat
.
Nested Class Summary | |
---|---|
static class |
TableSpec.FieldIndex
A database index made up by one or more Pangool Fields. |
Constructor Summary | |
---|---|
TableSpec(com.datasalt.pangool.io.Schema schema,
com.datasalt.pangool.io.Schema.Field partitionField)
Simple TableSpec constructor that creates one TableSpec for a schema with a single partition field that is also indexed. |
|
TableSpec(com.datasalt.pangool.io.Schema schema,
com.datasalt.pangool.io.Schema.Field[] partitionFields,
TableSpec.FieldIndex[] indexes,
java.lang.String[] initialSQL,
java.lang.String[] preInsertsSQL,
java.lang.String[] postInsertsSQL,
java.lang.String[] finalSQL,
com.datasalt.pangool.tuplemr.OrderBy insertionOrderBy)
Creates a Table specification. |
|
TableSpec(com.datasalt.pangool.io.Schema schema,
java.lang.String partitionByJavaScript,
TableSpec.FieldIndex[] indexes,
java.lang.String[] initialSQL,
java.lang.String[] preInsertsSQL,
java.lang.String[] postInsertsSQL,
java.lang.String[] finalSQL,
com.datasalt.pangool.tuplemr.OrderBy insertionOrderBy)
Creates a Table specification. |
Method Summary | |
---|---|
java.lang.String[] |
getFinalSQL()
|
TableSpec.FieldIndex[] |
getIndexes()
|
java.lang.String[] |
getInitialSQL()
|
com.datasalt.pangool.tuplemr.OrderBy |
getInsertionOrderBy()
|
java.lang.String |
getPartitionByJavaScript()
|
com.datasalt.pangool.io.Schema.Field[] |
getPartitionFields()
|
java.lang.String[] |
getPostInsertsSQL()
|
java.lang.String[] |
getPreInsertsSQL()
|
com.datasalt.pangool.io.Schema |
getSchema()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableSpec(com.datasalt.pangool.io.Schema schema, com.datasalt.pangool.io.Schema.Field partitionField)
public TableSpec(com.datasalt.pangool.io.Schema schema, com.datasalt.pangool.io.Schema.Field[] partitionFields, TableSpec.FieldIndex[] indexes, java.lang.String[] initialSQL, java.lang.String[] preInsertsSQL, java.lang.String[] postInsertsSQL, java.lang.String[] finalSQL, com.datasalt.pangool.tuplemr.OrderBy insertionOrderBy)
schema
- The schema that defines the tablepartitionFields
- fields to partition the table byindexes
- The indexes that mus be createdinitialSQL
- SQL statements that will be executed at the start of the process, just after
some default PRAGMA statements and just before the CREATE TABLE statements.preInsertsSQL
- SQL statements that will be executed just after the CREATE TABLE statements
but just before the INSERT statements used to insert data.postInsertsSQL
- SQL statements that will be executed just after all data is inserted but
just before the CREATE INDEX statements.finalSQL
- SQL statements that will be executed al the end of the process, just after the
CREATE INDEX statements.insertionOrderBy
- The order in which data is inserted in the database. That is very important
because affect data locality and some queries could go faster or very
slow depending on the order the data is stored. Usually, data should be
sorted in the same order than the main index that you will use for queries.
As a common rule, sort data in the proper order to answer the most important
queries of your system.public TableSpec(com.datasalt.pangool.io.Schema schema, java.lang.String partitionByJavaScript, TableSpec.FieldIndex[] indexes, java.lang.String[] initialSQL, java.lang.String[] preInsertsSQL, java.lang.String[] postInsertsSQL, java.lang.String[] finalSQL, com.datasalt.pangool.tuplemr.OrderBy insertionOrderBy)
schema
- The schema that defines the tablepartitionByJavaScript
- JavaScript function that applies to rows and returns a key that must
be used to partition.indexes
- The indexes that mus be createdinitialSQL
- SQL statements that will be executed at the start of the process, just after
some default PRAGMA statements and just before the CREATE TABLE statements.preInsertsSQL
- SQL statements that will be executed just after the CREATE TABLE statements
but just before the INSERT statements used to insert data.postInsertsSQL
- SQL statements that will be executed just after all data is inserted but
just before the CREATE INDEX statements.finalSQL
- SQL statements that will be executed al the end of the process, just after the
CREATE INDEX statements.insertionOrderBy
- The order in which data is inserted in the database. That is very important
because affect data locality and some queries could go faster or very
slow depending on the order the data is stored. Usually, data should be
sorted in the same order than the main index that you will use for queries.
As a common rule, sort data in the proper order to answer the most important
queries of your system.Method Detail |
---|
public com.datasalt.pangool.io.Schema getSchema()
public TableSpec.FieldIndex[] getIndexes()
public com.datasalt.pangool.io.Schema.Field[] getPartitionFields()
public java.lang.String getPartitionByJavaScript()
public java.lang.String[] getPostInsertsSQL()
public java.lang.String[] getInitialSQL()
public java.lang.String[] getFinalSQL()
public java.lang.String[] getPreInsertsSQL()
public com.datasalt.pangool.tuplemr.OrderBy getInsertionOrderBy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |