Classes | Public Member Functions
gov.lbl.fastbit.FastBitStringWriter Class Reference

Java StringWriter for FastBit. More...

List of all members.

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.

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

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 row by row String values.

Parameters:
handler
row
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