Loading standalone sources, caches, and WActionStores
Sources, caches, and WActionStores may be loaded outside of applications. This may be appropriate when they are shared by multiple applications and you want to make sure that they are not stopped accidentally. The LOAD and UNLOAD commands require the Global.admin role.
The following example would create, load, and start the cache ZipLookup
in the SharedCaches
namespace.
CREATE NAMESPACE SharedCaches; USE SharedCaches; CREATE TYPE ZipData( zip String KEY, latVal double, longVal double ); CREATE CACHE ZipLookup using FileReader ( directory: 'shared/caches', wildcard: 'zip_data.txt', positionByEOF:false ) PARSE USING DSVParser () QUERY (keytomap:'zip') OF ZipData; LOAD CACHE ZipLookup;
Since no options are specified for the LOAD
command, this would deploy the cache in the default deployment group. Optionally, you may specify deployment options as for the DEPLOY
command. For example, LOAD CACHE ZipLookup ON ALL IN DG1
would load the cache on all servers in deployment group DG1. For more information see Managing deployment groups.
Standalone components appear on the Monitor page in the UI and in MONITOR
output in the console as <namespace>.<component name>_app
. For example, the cache above would be SharedCaches.ZipData_app
.
To stop and undeploy the cache, you would enter:
UNLOAD CACHE SharedCaches.ZipLookup
;
Note
Standalone sources, caches, and WActionStores are not recoverable (see Recovering applications).