Persisted LiveView tables have a Table Space Reference identifying a Table Space configuration. The Table Space definition has a
Folder property which can take an absolute path to be used for the persistence and recovery file-store.
Setup:
1. In the Table Space configuration (.lvconf file) along with settings:
Persist Data -- enabled
Restore Data On Start -- enabled
also set:
Folder -- location of the persisted data
2. Set the LV Table configuration to reference the Table Space by name.
When
Persist Data is set and
Folder has a
simple name (for example, "
data"), the table persistence directory is
inside the node at location (example):
{node-directory}\application\engines\default-engine-for-com.sbsupport.PersistTest\data
This folder would be removed if the node directory is removed, losing the persisted data.
When
Folder has an
absolute path like this (example):
C:/businessapps/liveviewstoragethat location is used for the file-store. Make sure this path is available and writable by the user running the TIBCO Streaming server on all deployment systems. Use forward-slashes, '/', in the filename regardless of operating system. This folder is
not removed when the node is removed.
When starting or re-starting a node a log message shows saying where the data was recovered from:
2019-10-21 11:33:37.726000-0400 [70388:OperatorThread(BizData.EngineFactory.EngineImpl.SnapQueryEP.CQEngine_write.
TablePersistenceModuleRef1.TableFromFile:1)] INFO TableFromFile: Read 337 rows at 2,188 TPS from
C:\tmp\test\A.persist\application\engines\default-engine-for-com.sbsupport.PersistTest\data\BizData
\BizData_TablePersistenceModuleRef1_1571672010470.restore
We also recommend that if you are persisting table-data that you also persist Alert and LVWeb configuration. If you are using the default H2 database storage, add to the
LDMEngine HOCON configuration the setting (example):
systemProperties = {
"liveview.systemdata.directory" = "../lvdata"
}
This example places the storage directory parallel to the node directory, where it will survive when the node directory is removed and re-installed.
Note: LiveView Table persistence cannot be tested from a launch in Studio. Instead create an Application Archive project and run the application from the command-line to confirm table persistence is working as intended.