Top
Interstage Big Data Complex Event Processing Server V1.0.0 User's Guide
Interstage

4.5.1 Deleting a CEP Engine

This section explains how to delete a CEP engine.

Deleting a CEP engine that is no longer required allows the system resources such as memory and disk that were used by that CEP engine to be used for other purposes. This section explains how to delete a CEP engine using cepconfigeng.

Note

When a CEP engine is deleted, definition information deployed to the CEP engine (such as rule definitions) will also be deleted. The engine log and resource log of the CEP engine will be deleted as well. Take a backup as required. Refer to "6.3.2 Backup and Restore" for details.

Deleting a CEP engine using cepconfigeng

Below is a flowchart for deleting a CEP engine using cepconfigeng.

Figure 4.2 Flowchart for deleting a CEP engine

The procedure for deleting a CEP engine is explained below. For these tasks, log in as a superuser to execute the commands.

  1. Provide the current engine configuration file.

    An existing CEP engine must also be defined in the engine configuration file to be specified at cepconfigeng command execution. Therefore, define the settings of the CEP engine to be deleted based on the current stored engine configuration file.

    Point

    If an operation has been performed previously according to the execution example in "4.4.4.3 Creating a New CEP Engine", the current engine configuration file will be the following file:

    /etc/opt/FJSVcep/Engine.xml

    Note

    If the engine configuration file to be specified in cepconfigeng does not include an existing CEP engine definition, cepconfigeng will delete the CEP engine which is not specified in the engine configuration file.

  2. Back up the engine configuration file.

    Before editing the current engine configuration file, create a backup of the engine configuration file. Always create a backup to avoid losing definition information erroneously.

    Example

    Example of backing up the engine configuration file

    # cp /etc/opt/FJSVcep/Engine.xml /etc/opt/FJSVcep/Engine.bak.xml<ENTER>
  3. Edit the engine configuration file.

    Edit the engine configuration file using a command such as vi, and then comment out or delete the definition for the CEP engine to be deleted.

    Refer to "9.1.1 Engine Configuration File" for information on the format of the engine configuration file.

    Example

    Definition example of deleting a CEP engine called "NewCepEngine"

    In this example, the CEP engine called "NewCepEngine" that was created according to the execution example in "4.4.4.3 Creating a New CEP Engine" will be deleted.

    Below is a definition example of the engine configuration file.

    Rather than simply deleting the definition of the relevant part, the part from "<engineConfig id="NewCepEngine">" to "</engineConfig>" is commented out. Commenting out allows you to thoroughly check the deletion range while you work. The "CepEngine" that is displayed in the definition depends upon the CEP engine name specified at installation.

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <subSystemConfig xmlns="urn:xmlns-fujitsu-com:cspf:
    bdcep:v1">
    <engineConfig id="CepEngine">

    <logging>

    <type>file</type>

    </logging>

    <socketAdapterPort>9600</socketAdapterPort>
    </engineConfig>
    <!--
    <engineConfig id="NewCepEngine">

    </engineConfig>

    -->
    </subSystemConfig>
  4. Check the running status of the CEP service.

    The CEP service must be running to execute cepconfigeng. Use cepdispserv to check the status of the CEP service. Refer to "8.5 cepdispserv" for details.

  5. Check the stopped status of the engine.

    The target CEP engine must be stopped for cepconfigeng to be used to delete the CEP engine. Use cepdispeng to check the status of the engine. Refer to "8.4 cepdispeng" for details.

  6. Execute cepconfigeng.

    Specify the edited engine configuration file and execute cepconfigeng. When the command is executed, confirmation of the change is requested, so type "y" to continue execution. Execution of the command can be canceled by typing "n" or "q". Refer to "8.2 cepconfigeng" for details.

    Example

    Example of executing cepconfigeng

    Below is an example of specifying "/etc/opt/FJSVcep/Engine.xml" as the edited engine configuration file.

    # cepconfigeng -f /etc/opt/FJSVcep/Engine.xml<ENTER>
    Are you sure you want to change the
    CEP Engine configuration? [y,n,q]:y<ENTER>
    Command cepconfigeng executed successfully.
  7. Store the engine configuration file.

    The engine configuration file specified in cepconfigeng will be required in future for further additions or deletions of CEP engines or for changing settings, so store it in a safe place. Consider creating a backup on external media, as required.

    Note

    The backup creation method depends upon the management policy of the system. Always check with the system administrator.