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

9.2.1 Event Type Definition File

This section explains the setup file for describing the event type definition (event type definition file).


The event type definition file is an XML file that has "eventType" as the root element. An event type definition file is created for each event type. The items to be described will vary according to the format of the event data (CSV or XML format).


The items to be set in the event type definition file are shown below:

Element or attribute

Item name

Explanation

Allowed values

Mandatory/
optional

id

(attribute of "eventType")

Development asset ID

ID unique in the deployment CEP engine.

Used as the event type name specified in high-speed filter rules and as the event stream name specified in complex event processing rules.

Up to 39 alphanumeric characters, underscores (_), or hyphens (-).

Note: The first character must be a letter.

Mandatory

comment

Comment

Explanation of this definition.

Up to 1,000 characters.

Optional

type

Format

Format of the event data.

XML: Events are in XML format.

CSV: Events are in CSV format.

See Explanation.

Mandatory

xmlSchema

XML schema

XML schema that represents the structure of the event data.

This is described in XML schema language. Therefore, escape must be performed in a way that cannot be interpreted as a markup specification. For simple description, describe using a CDATA section instead of escaping.

Up to 1,048,576 characters.

(*1)

root

Root element

Name of the root element of the event.

The root element is one of the elements defined in the XML schema.

Specify unique root element names for all event type definitions.

Up to 512 characters.

(*1)

csvColumn

CSV column information

Column information that represents the structure of the event data.

Describe at least one "column" element (as described below).

Follows the column element (as described below).

There is no limit to the number of column elements.

(*2)

useLogging

Whether to use logging

Whether to use logging for pre-processing events of the high-speed filter received from the input adapter.

true: Use.

false: Do not use.

See Explanation.

Mandatory

loggingTableName

Log storage area

Absolute path of the log storage area for storing events.

This is used to store events received by the input adapter.

Even if logging an event in an engine log (when the engine structure file type element is set as file), for event identification set the virtual path name (for example, "/eventTypeID").

Up to 255 characters.

(*3)

useCep

Whether to use complex event processing

Controls whether to use complex event processing.

true: Use.

false: Do not use.

See Explanation.

Mandatory

*1: Mandatory if "XML" is specified as the format

*2: Mandatory if "CSV" is specified as the format

*3: Mandatory if logging is to be used



If "CSV" is specified as the format, describe the CSV column information shown below in the "csvColumn" element:

Element or attribute

Item name

Explanation

Allowed values

Mandatory/
optional

column

column

Describe as many of these as the number of event (CSV format) columns.

The column elements must be specified in the same order as in the event data.

(empty element)

Mandatory

name

(attribute of "column")

Item name

Item name of the CSV column.

Used as the item name specified in high-speed filter rules and as the property name specified in complex event processing rules.

Refer to "9.4 Characters Allowed in Item, Tag and Attribute Names".

Mandatory

type

(attribute of "column")

Item type

Data type of the CSV column.

string: String.

boolean: Boolean value (true/false).

byte: 8-bit signed integer.

int: 32-bit signed integer.

long: 64-bit signed integer.

float: 32-bit float.

double: 64-bit double precision float.

See Explanation.

Mandatory


The data types of CSV columns are converted to the appropriate type for complex event processing rules, as shown below:

Data type of CSV column

Data type in complex event processing rules

string

string

boolean

bool/boolean

byte

byte

int

int/integer

long

long

float

float

double

double


Point

If the high-speed filter is being used, the event types of the events passed to complex event processing and of the input events will vary, unless only extraction (filtering) is being used. In this case, a separate event type definition for complex event processing must be deployed.

Note

  • Up to 32 event type definitions can be deployed to one CEP engine.

  • Regardless of the CEP engine to deploy event type definitions, set a unique root element name for all event type definitions.

  • Regarding the useCep attribute (which determines whether to use complex event processing):

    Set "false" if only logging is to be used by the input adapter. An investigation of the content of input event data is considered prior to starting operation.

  • The column elements must be specified in the same order as in the event data.

  • When using cepgetrsc to display details of the development asset, the displayed XML schema uses the same format as used by the CDATA section.

Example

When XML format is selected

Target event data (XML):

<?xml version="1.0" encoding="UTF-8"?><messagedata xmlns="http://dataaccesscontrol.sspf.
fujitsu.com/namespace/xmlmessage"><memberID>MEM0001</memberID><areaID>1010</areaID><sta
tus>1</status></messagedata>

Please note that we added newlines in the example above (line 1 and 2) for readability only - the actual data does not have a newline.

Event type definitions:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<eventType xmlns="urn:xmlns-fujitsu-com:cspf:
bdcep:v1" id="EVENTTYPE_01">
<comment>
Event type definition_01</comment>
<type>XML</type>

<xmlSchema>

<![CDATA[

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

xmlns="http://dataaccesscontrol.sspf.fujitsu.com/namespace/xmlmessage"

targetNamespace="http://dataaccesscontrol.sspf.fujitsu.com/namespace/xmlmessage">

<xs:element name="messagedata">

<xs:complexType>

<xs:sequence>

<xs:element name="
memberID" type="xs:string" />
<xs:element name="
areaID" type="xs:string" />
<xs:element name="
status" type="xs:string" />
</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

]]>

</xmlSchema>

<root>messagedata</root>

<useLogging>true</useLogging>

<loggingTableName>/echonet</loggingTableName>

<useCep>true</useCep>

</eventType>

When CSV format is selected

Target event data (CSV):

"MEM0001","1010","1"

Event type definitions:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<eventType xmlns="urn:xmlns-fujitsu-com:cspf:
bdcep:v1" id="EVENTTYPE_02">
<comment>
Event type definition_02</comment>
<type>CSV</type>

<xmlSchema></xmlSchema>
<csvColumn>
<column name="memberID" type="string" />

<column name="areaID" type="string" />

<column name="status" type="string" />

</csvColumn>

<useLogging>
false</useLogging>
<useCep>true</useCep>

</eventType>

In this example, the event types below are defined.


EVENTTYPE_01

Using the input adapter, the event data is output to a log in "/echonet".

This event data is passed to complex event processing (only if it is not being filtered by the high-speed filter).


EVENTTYPE_02

In the input adapter, the event data is not output to a log.

This event data is passed to complex event processing (only if it is not being filtered by the high-speed filter).