Classes | Public Member Functions | List of all members
gov.lbl.fastbit.FastBitStringWriter Class Reference

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. More...
 
void addRow (final WriteHandle handler, String row) throws FastBitStringWriterException
 Add String values row by row. More...
 
synchronized void addStringColumnToMetadata (String partitionDirectory, String columnName, String type) throws FastBitStringWriterException
 Add column info to existing index metadata. More...
 
void addText (String partition, String colname, String[] arr, String charsetName) throws FastBitStringWriterException
 Add arbitrary string values. More...
 
synchronized void createMetadata (String partitionDirectory, String columnName, String type, int rowCount) throws FastBitStringWriterException
 Create metadata for a data partition with a single column. More...
 
 FastBitStringWriter ()
 FastBitStringWriter constructor with default buffer size.
 
 FastBitStringWriter (int bufferLength)
 FastBitStringWriter constructor. More...
 
WriteHandle getHandle (String partition, String colname, String charsetName) throws FastBitStringWriterException
 Create WriteHandle. More...
 
void saveDictionary (final WriteHandle handler, final Set< String > keys, String fileName) throws FastBitStringWriterException
 Add dictionary strings to a .dic file. More...
 

Detailed Description

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.

Author
Andrey Kolchanov

Constructor & Destructor Documentation

gov.lbl.fastbit.FastBitStringWriter.FastBitStringWriter ( int  bufferLength)
inline

FastBitStringWriter constructor.

Parameters
bufferLength

Member Function Documentation

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.

Parameters
partition
colname
arr
charsetName
Exceptions
FastBitStringWriterException

References gov.lbl.fastbit.FastBitStringWriter.addRow(), gov.lbl.fastbit.FastBitStringWriter.getHandle(), and gov.lbl.fastbit.FastBitStringWriter.saveDictionary().

void gov.lbl.fastbit.FastBitStringWriter.addRow ( final WriteHandle  handler,
String  row 
) throws FastBitStringWriterException
inline

Add String values row by row.

Parameters
handlerThe object to handle the actual write operation.
rowThe content of the row to be written.
Exceptions
FastBitStringWriterException

Referenced by gov.lbl.fastbit.FastBitStringWriter.addCategories(), and gov.lbl.fastbit.FastBitStringWriter.addText().

synchronized void gov.lbl.fastbit.FastBitStringWriter.addStringColumnToMetadata ( String  partitionDirectory,
String  columnName,
String  type 
) throws FastBitStringWriterException
inline

Add column info to existing index metadata.

Parameters
partitionDirectory
columnName
type
Exceptions
FastBitStringWriterException
void gov.lbl.fastbit.FastBitStringWriter.addText ( String  partition,
String  colname,
String[]  arr,
String  charsetName 
) throws FastBitStringWriterException
inline

Add arbitrary string values.

Parameters
partition
colname
arr
charsetName
Exceptions
FastBitStringWriterException

References gov.lbl.fastbit.FastBitStringWriter.addRow(), and gov.lbl.fastbit.FastBitStringWriter.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.

Parameters
partitionDirectoryDirectory for the data partition
columnNameColumn name. Also used as the data partition name.
typeData type.
rowCountNumber of rows.
Exceptions
FastBitStringWriterException
WriteHandle gov.lbl.fastbit.FastBitStringWriter.getHandle ( String  partition,
String  colname,
String  charsetName 
) throws FastBitStringWriterException
inline

Create WriteHandle.

Parameters
partition
colname
charsetName
Returns
Exceptions
FastBitStringWriterException

Referenced by gov.lbl.fastbit.FastBitStringWriter.addCategories(), and gov.lbl.fastbit.FastBitStringWriter.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.

Parameters
handler
keys
fileName
Exceptions
FastBitStringWriterException

Referenced by gov.lbl.fastbit.FastBitStringWriter.addCategories().


The documentation for this class was generated from the following file:

Make It A Bit Faster
Contact us
Disclaimers
FastBit source code
FastBit mailing list archive