Interface AppendableTable<COLUMN_IMPL_TYPE extends AppendableColumn>
- Type Parameters:
COLUMN_IMPL_TYPE
- A bound on the implementation class for this table's appendable columns
- All Known Subinterfaces:
BufferedAppendableTable<COLUMN_IMPL_TYPE>
- All Known Implementing Classes:
LocalAppendableTable
public interface AppendableTable<COLUMN_IMPL_TYPE extends AppendableColumn>
Interface for appending to a single partition or standalone splayed table.
-
Method Summary
Modifier and Type Method Description default void
addRecords(Object[] columnData, int startIndex, int length)
Optional method to allow one or more data rows to be appended.void
close()
Optional method to flush all data and metadata before closing underlying resources (if applicable).void
flush()
Optional method to flush data to this table's persistent storage (if applicable).COLUMN_IMPL_TYPE
getColumn(String columnName)
Get a column for this table by name.Map<String,COLUMN_IMPL_TYPE>
getColumnMap()
Get a map of all of theAppendableTable
s by name.COLUMN_IMPL_TYPE[]
getColumns()
Get an array of all of theAppendableTable
s for this table.TableDefinition
getDefinition()
void
setDataIndexes(List<String[]> dataIndexes)
Set the list of data indices for this location.void
setSortedColumns(List<SortPair> sortedColumns)
Set the ordered list of sorted columns for this location.long
size()
void
updateSize(long size)
Set the size of this appendable table in rows.
-
Method Details
-
getDefinition
TableDefinition getDefinition() -
getColumn
Get a column for this table by name.- Parameters:
columnName
- The column name- Returns:
- The desired column
-
getColumns
COLUMN_IMPL_TYPE[] getColumns()Get an array of all of theAppendableTable
s for this table.- Returns:
- an array of
AppendableTable
-
getColumnMap
Map<String,COLUMN_IMPL_TYPE> getColumnMap()Get a map of all of theAppendableTable
s by name.- Returns:
- a map of column name to column
-
size
long size()- Returns:
- The size of this appendable table in rows
-
updateSize
void updateSize(long size)Set the size of this appendable table in rows. This is for use by utilities that write directly to an AppendableTable's columns, in order to record that a set of rows has been added to all columns and should be available for checkpointing or reading. All columns should be flushed before this call, either externally or via theflush()
method.- Parameters:
size
- The new size
-
setSortedColumns
Set the ordered list of sorted columns for this location.- Parameters:
sortedColumns
- the ordered list of sorted columns
-
setDataIndexes
Set the list of data indices for this location.- Parameters:
dataIndexes
- the data indices.
-
addRecords
Optional method to allow one or more data rows to be appended. This uses boxed arrays of data, and hence is not a preferred mechanism. Updates size internally.- Parameters:
columnData
- Array of arrays (lengths *must* be identical) to append, one member per non-virtual column, in table definition orderstartIndex
- Index within the arrays to start fromlength
- Number of rows to append
-
flush
void flush()Optional method to flush data to this table's persistent storage (if applicable). -
close
void close()Optional method to flush all data and metadata before closing underlying resources (if applicable).
-