|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.zebra.io.BasicTable.Writer
public static class BasicTable.Writer
BasicTable writer.
Constructor Summary | |
---|---|
BasicTable.Writer(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf)
Reopen an already created BasicTable for writing. |
|
BasicTable.Writer(org.apache.hadoop.fs.Path path,
String btSchemaString,
String btStorageString,
org.apache.hadoop.conf.Configuration conf)
a wrapper to support backward compatible constructor |
|
BasicTable.Writer(org.apache.hadoop.fs.Path path,
String btSchemaString,
String btStorageString,
String sortColumns,
String comparator,
org.apache.hadoop.conf.Configuration conf)
Create a BasicTable writer. |
Method Summary | |
---|---|
void |
close()
Close the BasicTable for writing. |
DataOutputStream |
createMetaBlock(String name)
Obtain an output stream for creating a Meta Block with the specific name. |
void |
finish()
Release resources used by the object. |
TableInserter |
getInserter(String name,
boolean finishWriter)
Get a inserter with a given name. |
TableInserter |
getInserter(String name,
boolean finishWriter,
boolean checkType)
Get a inserter with a given name. |
Schema |
getSchema()
Get the schema of the table. |
SortInfo |
getSortInfo()
Get the list of sorted columns. |
boolean |
isSorted()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicTable.Writer(org.apache.hadoop.fs.Path path, String btSchemaString, String btStorageString, String sortColumns, String comparator, org.apache.hadoop.conf.Configuration conf) throws IOException
path
- The path to the Basic Table, either not existent or must be a
directory.btSchemaString
- The schema of the Basic Table. For this version of
implementation, the schema of a table is a comma or
semicolon-separated list of column names, such as
"FirstName, LastName; Sex, Department".sortColumns
- String of comma-separated sorted columns: null for unsorted tablescomparator
- Name of the comparator used in sorted tablesconf
- Optional Configuration objects.
IOException
Schema
public BasicTable.Writer(org.apache.hadoop.fs.Path path, String btSchemaString, String btStorageString, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public BasicTable.Writer(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
Method Detail |
---|
public void finish() throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
IOException
public Schema getSchema()
public boolean isSorted()
public SortInfo getSortInfo()
public TableInserter getInserter(String name, boolean finishWriter) throws IOException
name
- the name of the inserter. If multiple calls to getInserter with
the same name has been called, we expect they are the result of
speculative execution and at most one of them will succeed.finishWriter
- finish the underlying Writer object upon the close of the
Inserter. Should be set to true if there is only one inserter
operate on the table, so we should call finish() after the
Inserter is closed.
IOException
public TableInserter getInserter(String name, boolean finishWriter, boolean checkType) throws IOException
name
- the name of the inserter. If multiple calls to getInserter with
the same name has been called, we expect they are the result of
speculative execution and at most one of them will succeed.finishWriter
- finish the underlying Writer object upon the close of the
Inserter. Should be set to true if there is only one inserter
operate on the table, so we should call finish() after the
Inserter is closed.checktype
- whether or not do type check.
IOException
public DataOutputStream createMetaBlock(String name) throws MetaBlockAlreadyExists, IOException
name
- The name of the Meta Block
IOException
MetaBlockAlreadyExists
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |