Java StringWriter for FastBit. More...
Classes | |
class | WriteHandle |
An auxiliary thread-safe class to hold file locks and buffers. More... | |
Public Member Functions | |
void | addCategories (String partition, String colname, String[] arr, String charsetName) throws FastBitStringWriterException |
Add String values with a small number of distinct choices. | |
void | addRow (final WriteHandle handler, String row) throws FastBitStringWriterException |
Add row by row String values. | |
synchronized void | addStringColumnToMetadata (String partitionDirectory, String columnName, String type) throws FastBitStringWriterException |
Add column info to existing index metadata. | |
void | addText (String partition, String colname, String[] arr, String charsetName) throws FastBitStringWriterException |
Add arbitrary string values. | |
synchronized void | createMetadata (String partitionDirectory, String columnName, String type, int rowCount) throws FastBitStringWriterException |
Create metadata for a data partition with a single column. | |
FastBitStringWriter () | |
FastBitStringWriter constructor with default buffer size. | |
FastBitStringWriter (int bufferLength) | |
FastBitStringWriter constructor. | |
WriteHandle | getHandle (String partition, String colname, String charsetName) throws FastBitStringWriterException |
Create WriteHandle. | |
void | saveDictionary (final WriteHandle handler, final Set< String > keys, String fileName) throws FastBitStringWriterException |
Add dictionary strings to a .dic file. |
Java StringWriter for FastBit.
For a Java program to write string-valued data to a format required by FastBit. See java/tests/TestFastBitJava.java for an example of use.
gov::lbl::fastbit::FastBitStringWriter::FastBitStringWriter | ( | int | bufferLength | ) | [inline] |
FastBitStringWriter constructor.
bufferLength |
void gov::lbl::fastbit::FastBitStringWriter::addCategories | ( | String | partition, |
String | colname, | ||
String[] | arr, | ||
String | charsetName | ||
) | throws FastBitStringWriterException [inline] |
Add String values with a small number of distinct choices.
partition | |
colname | |
arr | |
charsetName |
FastBitStringWriterException |
References addRow(), getHandle(), and saveDictionary().
void gov::lbl::fastbit::FastBitStringWriter::addRow | ( | final WriteHandle | handler, |
String | row | ||
) | throws FastBitStringWriterException [inline] |
Add row by row String values.
handler | |
row |
FastBitStringWriterException |
Referenced by addCategories(), and addText().
synchronized void gov::lbl::fastbit::FastBitStringWriter::addStringColumnToMetadata | ( | String | partitionDirectory, |
String | columnName, | ||
String | type | ||
) | throws FastBitStringWriterException [inline] |
Add column info to existing index metadata.
partitionDirectory | |
columnName | |
type |
FastBitStringWriterException |
void gov::lbl::fastbit::FastBitStringWriter::addText | ( | String | partition, |
String | colname, | ||
String[] | arr, | ||
String | charsetName | ||
) | throws FastBitStringWriterException [inline] |
Add arbitrary string values.
partition | |
colname | |
arr | |
charsetName |
FastBitStringWriterException |
References addRow(), and getHandle().
synchronized void gov::lbl::fastbit::FastBitStringWriter::createMetadata | ( | String | partitionDirectory, |
String | columnName, | ||
String | type, | ||
int | rowCount | ||
) | throws FastBitStringWriterException [inline] |
Create metadata for a data partition with a single column.
partitionDirectory | Directory for the data partition |
columnName | Column name. Also used as the data partition name. |
type | Data type. |
rowCount | Number of rows. |
FastBitStringWriterException |
WriteHandle gov::lbl::fastbit::FastBitStringWriter::getHandle | ( | String | partition, |
String | colname, | ||
String | charsetName | ||
) | throws FastBitStringWriterException [inline] |
Create WriteHandle.
partition | |
colname | |
charsetName |
FastBitStringWriterException |
Referenced by addCategories(), and addText().
void gov::lbl::fastbit::FastBitStringWriter::saveDictionary | ( | final WriteHandle | handler, |
final Set< String > | keys, | ||
String | fileName | ||
) | throws FastBitStringWriterException [inline] |
Add dictionary strings to a .dic file.
handler | |
keys | |
fileName |
FastBitStringWriterException |
Referenced by addCategories().
![]() |