Top
Interstage Big DataComplex Event Processing Server V1.1.0 User's Guide
FUJITSU Software

8.3 cepdeployrsc

Name

cepdeployrsc - Development asset deployment, and dynamic change of rule definitions and the master data

Format
Format 1:
cepdeployrsc resource [-o] [-e engineName] -f xmlFilePath

Format 2:
cepdeployrsc rule -h [-e
engineName] -f xmlFilePath

Format 3:
cepdeployrsc master
-h [-e engineName]
Function description

If format 1 is used, this command deploys a development asset to a CEP engine.

Specify the type of development asset (event type definition, rule definition, master definition, RDB reference definition, or SOAP listener definition) to be deployed.

If format 2 is used, this command applies the updated rule definition without stopping the CEP engine. (dynamic change of a rule definition).

If format 3 is used, this command applies the updated master data without stopping the CEP engine. (dynamic change of the master data).

When the command is executed, a prompt for confirming the deployment and dynamic change is displayed. Type "y" and press the Enter key to execute the deployment and dynamic change. Execution can be canceled by typing "n" or "q" and pressing the Enter key.

Example

Example of query (for a SOAP listener definition to be deployed):

Are you sure you want to deploy the SOAP listener definition?(default: y) [y,n,q]:

Example of query (for dynamic change of a rule definition):

Are you sure you want to hotdeploy the rule definition?(default: y) [y,n,q]:

Example of query (for dynamic change of the master data):

Are you sure you want to hotdeploy the master data?(default: y) [y,n,q]:
Arguments
resource

Specify the type of development asset. You can specify only "rule" or "master" when performing a dynamic change.


eventtype

Event type definition

rule

Rule definition

master

Master definition

rdb_ref

RDB reference definition

listener

SOAP listener definition


-o

For deployment of a development asset, this option is used to overwrite the definition content. It cannot be specified for a dynamic change.

If this option is omitted at deployment of a development asset, and if a development asset with the same ID as that specified in the definition file has already been deployed, an error message will be output and the deployment will fail.


-e engineName

Specify the name of the CEP engine to which the development asset is to be deployed or a dynamic change is to be made.

If only one CEP engine has been configured, this option can be omitted.

If this option is omitted, and if there are two or more configured CEP engines, an error message will be output and the deployment or dynamic change will fail.


-f xmlFilePath

When deploying a development asset or dynamically changing a rule definition, specify the definition file that describes the definition content of the development asset. We recommend specifying an absolute path. This option cannot be specified for dynamic change of the master data.

-h

This option dynamically changes a rule definition or the master data.

See

Refer to "9.2 Defining Development Assets" for information on the definition file.


End status

The following status codes are returned:

0

Normal end

8

Abnormal end


Note

  • A file storing detailed display results (XML format) output by cepgetrsc can also be specified as the definition file (refer to "8.7 cepgetrsc" for details).

  • If format 1 is used, development asset deployment cannot be performed while the CEP engine that is the deployment target is running.

  • Take the following points into account when performing dynamic change using format 2 or 3:

    • If the target CEP engine is stopped, dynamic change cannot be performed.

    • The only development assets that can be dynamically changed are rule definitions. You cannot dynamically change rule definitions that reference an undeployed event type definition, master definition, RDB reference definition, or SOAP listener definition.

    • For dynamically changing a rule definition, the rule definition with the same development asset ID as the new rule definition must have already been deployed.

    • If there is a change in the high-speed filter rule when a rule definition is dynamically changed, all master data being used on the target CEP engine is reloaded.

    • If there is a change in a complex event processing rule when a rule definition is dynamically changed, the information held in a window by the complex event processing rule is lost.

    • In the following cases, the dynamic change process is canceled and the cepdeployrsc command ends normally with a message output to the screen:

      • If a rule definition file not requiring any change is specified, the dynamic change process for the rule definition is canceled.

      • If the rule definition has not been deployed, or if a deployed rule definition does not contain a high-speed filter rule, the dynamic change process for the master data is canceled.

      • If the master definition has not been deployed, the dynamic change process for the master data is canceled.

    • While dynamic change is executing, the events to be processed are accumulated in an internal queue and processing is resumed after dynamic change succeeds.

    • If dynamic change fails due to a syntax error in a rule or any other reason, the CEP engine stops. To perform dynamic change during operations, check the operation on a different CEP engine beforehand and then perform dynamic change.

Example

Example of output at normal end

When a SOAP listener definition file (listenerdeploy.xml) is deployed to a CEP engine (CepEngine1):

$ cepdeployrsc listener -o -e CepEngine1 -f /tmp/listenerdeploy.xml <ENTER>
Are you sure you want to deploy the SOAP listener definition?
(default: y) [y,n,q]:y <ENTER>
Command cepdeployrsc executed successfully.

When a rule definition file (rule.xml) is dynamically changed on a CEP engine (CepEngine1):

$ cepdeployrsc rule -h -e CepEngine1 -f /tmp/rule.xml <ENTER>
Are you sure you want to hotdeploy the rule definition?(default: y) [y,n,q]:y <ENTER>

Command cepdeployrsc executed successfully.

When the master data is dynamically changed on a CEP engine (CepEngine1):

$ cepdeployrsc master -h -e CepEngine1 <ENTER>
Are you sure you want to hotdeploy the master data?(default: y) [y,n,q]:y <ENTER>

Command cepdeployrsc executed successfully.

Example of output at abnormal end

When an attempt is made to deploy a SOAP listener definition during the execution of a command that cannot be executed at the same time:

$ cepdeployrsc listener -o -e CepEngine1 -f /tmp/listenerdeploy.xml <ENTER>
Are you sure you want to deploy the SOAP listener definition?
(default: y) [y,n,q]:<ENTER>
Processing cannot be performed because another command is executing.
Command cepdeployrsc execution failed.

When the rule to be dynamically changed contains a syntax error:

$ cepdeployrsc rule -h -e CepEngine1 -f /tmp/rule.xml <ENTER>
Are you sure you want to hotdeploy the rule definition?(default: y) [y,n,q]:<ENTER>

The definition file contents are incorrect. Filename=(/tmp/rule.xml)

Command cepdeployrsc execution failed.

When an attempt is made to dynamically change a rule definition that has the ID of an undeployed development asset:

$ cepdeployrsc rule -h -e CepEngine1 -f /tmp/rule.xml <ENTER>
Are you sure you want to hotdeploy the rule definition?(default: y) [y,n,q]:<ENTER>

The rule definition has not been deployed. Id=(RULE01)

Command cepdeployrsc execution failed.

When an attempt is made to dynamically change the master data while the CEP engine is stopped:

$ cepdeployrsc master -h -e CepEngine1 <ENTER>
Are you sure you want to hotdeploy the master data?(default: y) [y,n,q]:<ENTER>

CEP Engine is not started. EngineId=(CepEngine1)

Command cepdeployrsc execution failed.