This section explains the settings of the engine configuration file.
The engine configuration file is an XML file that has "subSystemConfig" as the root element. The configuration information of one CEP engine is described in an "engineConfig" element. When multiple CEP engines are being created, the configurations of all the CEP engines must be described in one engine configuration file (using consecutive "engineConfig" elements).
Also, if Logging is to be used in the input adapter, describe the "logging" subelement in the "engineConfig" element.
The items to be set in the engine configuration file are shown below:
Element or attribute | Item name | Explanation | Allowed values | Mandatory/ |
---|---|---|---|---|
id (attribute of the "engineConfig" element) | CEP engine name | ID that uniquely identifies the CEP engine. | Up to 20 alphanumeric characters, including underscores (_). Note: The first character must be a letter. | Mandatory |
type (*1) | Logging type | Log destination. bdpp: Output to a Hadoop system. file: Output to the engine log. | See Explanation. | (*2) |
directory (*1) | Directory name | Directory of the Hadoop system that is the log destination. Specify one of the following:
| Up to 1023 alphanumeric characters, including forward slashes (/). Note: Use only alphanumeric characters for subdirectory names. | (*3) |
loggingMaxOpenFile (*1) | Number of open log files | Number of files to be simultaneously opened for the Hadoop system. The default is 6. | 1 to 122. | (*4) |
loggingRotationCycle (*1) | Logging cycle time | Time from when the event log files are opened until those files are renamed as files that can be analyzed (using the ".done" extension). The default is 300 (seconds). | 1 to 2592000. (unit: seconds) | (*4) |
socketAdapterPort | Socket adapter port | Reception port number to be used by the socket adapter. | 1 to 65535. | (*5) |
*1: Subelement of the logging element
*2: Mandatory if logging is to be used
*3: Mandatory if logging is to be used and the logging type is "bdpp"
*4: Optional if logging is to be used and the logging type is "bdpp"
*5: Specified if socket communication is to be used by the input adapter
Point
The log destination (path) in a Hadoop system is specified in the event type definition. Therefore, if "bdpp" is specified in the logging type, there is no need to specify the log destination (path).
If "bdpp" is to be specified in the log destination, the Interstage Big Data Parallel Processing Server (hereafter, referred to as "BDPP") must be set up beforehand (refer to "4.4.2 Setup of Hadoop Collaboration" for details).
Note
Up to five CEP engines ("engineConfig" elements) can be described in the engine configuration file.
Specify a CEP engine name that is different from other CEP engine names described in the engine configuration file. CEP engine names that differ only in the capitalization of letters are treated as duplicate names. The following example specifies duplicate names:
<engineConfig id="CEPEngine">
:
</engineConfig>
<engineConfig id="CepEngine">
:
</engineConfig>
Do not specify a name that is identical to an existing CEP engine name, except for the capitalization of letters.
The following example specifies the name "CepEngine", which differs from the existing CEP engine name "CEPEngine" only in terms of capitalization:
Specify a port number that is not being used by the system as the socket adapter port.
The same port number can be specified for the socket adapter port of multiple CEP engines, but the CEP engines cannot be started simultaneously.
Example
When two CEP engines (CepEngine1 and CepEngine2) are configured
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subSystemConfig xmlns="urn:xmlns-fujitsu-com:cspf:bdcep:v1">
<engineConfig id="CepEngine1">
<logging>
<type>bdpp</type>
<directory>hadoop</directory>
<loggingMaxOpenFile>6</loggingMaxOpenFile>
<loggingRotationCycle>300</loggingRotationCycle>
</logging>
<socketAdapterPort>9600</socketAdapterPort>
</engineConfig>
<engineConfig id="CepEngine2">
<logging>
<type>file</type>
</logging>
<socketAdapterPort>9601</socketAdapterPort>
</engineConfig>
</subSystemConfig>
In this example, the following settings are used to configure the CEP engines:
Uses logging and records events in a Hadoop system (Directory name: hadoop). The number of logging files that can be opened is 6, and the logging cycle time is 300 seconds.
Uses the socket adapter listening at port 9600.
Uses logging and records events in the engine log.
Uses the socket adapter listening at port 9601.