1.1.1

Table Of Contents
Syntax
SYS.ATTACH_WRITER
(
IN SCHEMA_NAME VARCHAR(128) NOT NULL,
IN TABLE_NAME VARCHAR(128) NOT NULL,
IN FUNCTION_STRING VARCHAR() NOT NULL,
IN IN-IT_INFO_STR VARCHAR(),
IN SERVER_GROUPS VARCHAR()
)
Description
The writer should be an implementation of the EventCallback interface. The onEvent method of the implementation
is invoked before an event (such as an insert, update or delete) occurs on the table. Only one writer can be attached
to a table. If a writer is already attached to a table, then the new writer replaces the previous one.
Example
The following code adds an example writer implementation to a table. Example Writer
Implementation on page 196 shows the writer code.
Connection conn = getConnection();
CallableStatement cs = conn
.prepareCall("CALL SYS.ATTACH_WRITER(?,?,?,?,?)");
cs.setString(1, "test");
cs.setString(2, "table");
cs.setString(3, "testpackage.EventCallBackWriterImpl");
cs.setString(4, "emp.ftable:3");
cs.setString(5, null);
cs.execute();
SYS.CREATE_ALL_BUCKETS
Pre-allocate buckets for partitioned table data.
Syntax
SYS.CREATE_ALL_BUCKETS()
By default, SQLFire assigns partitioned table buckets to individual data store members lazily, as rows are inserted
to a partitioned table. However, if you rapidly load data into a partitioned table using concurrent threads, data
can be inserted to the table before new bucket assignments are distributed to available data stores. This can result
in partitioned table data that is skewed among data stores in your cluster.
As a best practice, use SYS.CREATE_ALL_BUCKETS() before you load partitioned table data to ensure that
the data is evenly distributed among available data stores.
Example
sqlf> call sys.create_all_buckets();
SYS.REBALANCE_ALL_BUCKETS
Rebalance partitioned table data on available SQLFire members.
Syntax
SYS.REBALANCE_ALL_BUCKETS()
Rebalancing is a SQLFire member operation that affects partitioned tables created created in the cluster.
Rebalancing performs two tasks:
vFabric SQLFire User's Guide614
vFabric SQLFire Reference